public TWMIFSCHEDULE MapObjectToEntity(IFWorkpacketSchedule obj) { if (obj != null) { return(new TWMIFSCHEDULE { CD_CREW = obj.CrewId, CD_CREW_CLASS = obj.CrewClassCode, CD_SEQ_ERROR = GetIfSequenceNo(), DT_SCHED = obj.ScheduleDate, DT_WORK = obj.WorkDate, FG_CREW_MUSTDO = obj.CrewMustDoFlag, FG_HOLD_RESCHEDULE = obj.RescheduleHoldFlag, HR_REMAINING = obj.RemainingHours, TS_SCHEDULE = obj.TimeStamp, CD_DIST = obj.District, CD_SEQ_ERROR_RUN = obj.ErrorRunSequenceCode, CD_WORKPACKET = obj.WorkPacket, CD_WR = obj.WorkRequest, FG_ERROR = obj.ErrorFlag }); } return(null); }
// public void Create(IFWorkpacketSchedule obj) { unitOfWork.IfWorkpacketScheduleRepo.Insert(MapObjectToEntity(obj)); unitOfWork.Save(); }