示例#1
0
        public int AddResult(ExamineRecord record, ExamineResult result)
        {
            var maxId  = repository.GetMaxId("HR_EXAMINERESULT", "RESULTID");
            var entity = ModelToEntity(result);

            entity.EXAMID     = maxId;
            entity.CREATEDATE = DateTime.Now;
            //entity.CreatorUserId
            repository.Insert(entity);
            return(maxId);
        }
示例#2
0
 private HR_EXAMINERESULT ModelToEntity(ExamineResult model)
 {
     if (model != null)
     {
         var entity = new HR_EXAMINERESULT()
         {
             RESULTID = model.ResultId,
             EXAMID   = model.ExamId,
             //ITEMCODE = model.ItemCode,
             RESULT = model.Result
         };
         return(entity);
     }
     return(null);
 }
示例#3
0
 private ExamineResult EntityToModel(HR_EXAMINERESULT entity)
 {
     if (entity != null)
     {
         var model = new ExamineResult()
         {
             ResultId = entity.RESULTID,
             ExamId   = entity.EXAMID ?? 0,
             //ItemCode = entity.ITEMCODE,
             Result = entity.RESULT,
             //Remark = ""
         };
         return(model);
     }
     return(null);
 }