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

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

 1         private void btnComment_Click(object sender, EventArgs e)
 2         {
 3             bool commnets = false;
 4             List<KeyValuePair<stringobject>> parameters = new List<KeyValuePair<string,object>>();
 5             parameters.Add(new KeyValuePair<stringobject>(BaseCommentEntity.FieldCategoryCode, this.Name));
 6             parameters.Add(new KeyValuePair<stringobject>(BaseCommentEntity.FieldObjectId, this.EntityId));
 7             parameters.Add(new KeyValuePair<stringobject>(BaseCommentEntity.FieldDeletionStateCode, 0));
 8             commnets = DbLogic.Exists(this.UserCenterDbHelper, BaseCommentEntity.TableName, parameters);
 9             // 若有记录显示列表页面,若没记录直接显示添加页面
10             if (commnets)
11             {
12                 FrmCommnets frmCommnets = new FrmCommnets(this.Name, this.EntityId);
13                 frmCommnets.ShowDialog();
14             }
15             else
16             {
17                 FrmCommentAdd frmCommentAdd = new FrmCommentAdd(this.Name, this.EntityId);
18                 frmCommentAdd.ShowDialog();
19             }
20         }

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-09
  • 2021-04-08
  • 2021-11-24
  • 2021-11-22
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2021-07-05
  • 2021-06-22
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
相关资源
相似解决方案