コード例 #1
0
ファイル: TemplateManBLL.cs プロジェクト: x55756016/kmproject
 /// <summary>
 /// Entity转Model
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public ItemStandVal EntityToModel(HR_ITEMSTANDVAL entity)
 {
     if (entity != null)
     {
         var model = new ItemStandVal()
         {
             ID             = entity.ID,
             ITEMNO         = entity.ITEMNO,
             NAMEENG        = entity.NAMEENG,
             MINVALUE       = entity.MINVALUE,
             MAXVALUE       = entity.ITEMMAXVALUE,
             UNIT           = entity.UNIT,
             CREATEUSERID   = entity.CREATEUSERID,
             CREATEDATETIME = entity.CREATEDATETIME,
             EDITUSERID     = entity.EDITUSERID,
             EDITDATETIME   = entity.EDITDATETIME,
             ISDELETED      = entity.ISDELETED,
             OWNERID        = entity.OWNERID
         };
         return(model);
     }
     return(null);
 }
コード例 #2
0
ファイル: TemplateManBLL.cs プロジェクト: x55756016/kmproject
 public HR_ITEMSTANDVAL ModelToEntity(ItemStandVal model)
 {
     if (model != null)
     {
         var entity = new HR_ITEMSTANDVAL()
         {
             ID             = model.ID,
             ITEMNO         = model.ITEMNO,
             NAMEENG        = model.NAMEENG,
             MINVALUE       = model.MINVALUE,
             ITEMMAXVALUE   = model.MAXVALUE,
             UNIT           = model.UNIT,
             CREATEUSERID   = model.CREATEUSERID,
             CREATEDATETIME = model.CREATEDATETIME,
             EDITUSERID     = model.EDITUSERID,
             EDITDATETIME   = model.EDITDATETIME,
             ISDELETED      = model.ISDELETED,
             OWNERID        = model.OWNERID
         };
         return(entity);
     }
     return(null);
 }