Simple and rapid development of C \ S architecture program with the most simple non-hierarchical fastest efficiency of the functional requirements of the example program FrmUserEdit Add comment function results page ...

 The function of this page comment has been optimized when there is no comment, displayed directly add pages, the page displays a list of comments when there are comments, so users will be very easy to operate, can sometimes be less one more time, to improve the software has goodness.

 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 new  KeyValuePair < String Object > (BaseCommentEntity.FieldObjectId,  the this .EntityId));
 . 7              Parameters.Add ( new new  KeyValuePair < String Object > (BaseCommentEntity.FieldDeletionStateCode,  0 ));
 . 8              commnets = DbLogic.Exists ( the this .UserCenterDbHelper, BaseCommentEntity.TableName, the Parameters);
 9               //  if the page displays a list of records, if no record is displayed directly add pages 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         }

 

 

 

Reproduced in: https: //my.oschina.net/iwenr/blog/227668

Guess you like

Origin blog.csdn.net/weixin_34387284/article/details/91674362