public static GoOutReasonViewModel ToModel(this GoOutReason data) { var entity = AutoMapper.Mapper.Map <GoOutReasonViewModel>(data); //entity.FullName = data.EmpCode; return(entity); }
public SaveGoOutReasonResult SaveGoOutReason(GoOutReason entity, string Mode) { using (TransactionEntities Context = new TransactionEntities()) { var result = Context.SaveGoOutReason( mode: Mode , goOutID: entity.GoOutID , prodDate: entity.ProdDate , empCode: entity.EmpCode , reason: entity.Reason , startTime: entity.StartTime , endTime: entity.EndTime , userCode: entity.UpdateBy ).FirstOrDefault(); return(result); } }