您的位置:首页 > 运维架构 > 网站架构

简单快速开发C\S架构程序用最简单的不分层最快的效率达到功能要求的例子程序FrmUserEdit 添加评论功能页面效果

2012-09-02 19:07 1186 查看


这个页面进行评论的功能也进行了优化,当没有评论时,直接显示添加页面,有评论时显示评论列表页面,这样用户操作起来会非常方便,有时候可以会少操作1次,提高软件的有善性。

1 private void btnComment_Click(object sender, EventArgs e)
2 {
3 bool commnets = false;
4 List<KeyValuePair<string, object>> parameters = new List<KeyValuePair<string,object>>();
5 parameters.Add(new KeyValuePair<string, object>(BaseCommentEntity.FieldCategoryCode, this.Name));
6 parameters.Add(new KeyValuePair<string, object>(BaseCommentEntity.FieldObjectId, this.EntityId));
7 parameters.Add(new KeyValuePair<string, object>(BaseCommentEntity.FieldDeletionStateCode, 0));
8 commnets = DbLogic.Exists(this.UserCenterDbHelper, BaseCommentEntity.TableName, parameters);
9 // 若有记录显示列表页面,若没记录直接显示添加页面
if (commnets)
{
FrmCommnets frmCommnets = new FrmCommnets(this.Name, this.EntityId);
frmCommnets.ShowDialog();
}
else
{
FrmCommentAdd frmCommentAdd = new FrmCommentAdd(this.Name, this.EntityId);
frmCommentAdd.ShowDialog();
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐