public TWMCUJOBCODE MapObjectToEntity(CuJobCode obj) { TWMCUJOBCODE entity = new TWMCUJOBCODE(); entity = MapRootObjectToEntity(obj, entity); return(entity); }
public void Create(CuJobCode obj) { if (obj != null) { Delete(obj); Insert(obj); } }
public Point TransformToPoint(CuJobCode obj) { Point point = new Point(); point.PointNumber = obj.NO_POINT; point.PointSpanNumber = obj.NO_POINT_SPAN; return(point); }
private void UpdateRoot(CuJobCode obj) { var entity = unitOfWork.CuJobCodeRepo.GetSingle(m => m.CD_JOB == obj.CD_JOB && m.CD_MU == obj.CD_MU && m.CD_CU == obj.CD_CU); entity = MapRootObjectToEntity(obj, entity); unitOfWork.CuJobCodeRepo.Update(entity); unitOfWork.Save(); }
public CuJobCode Get(TWMCUJOBCODE entity) { if (entity != null) { CuJobCode obj = MapEntityToObject(entity); return(obj); } return(null); }
public TWMCUJOBCODE MapRootObjectToEntity(CuJobCode obj, TWMCUJOBCODE entity) { entity.CD_JOB = obj.CD_JOB; entity.CD_CU = obj.CD_CU; entity.NO_POINT = obj.NO_POINT; entity.NO_POINT_SPAN = obj.NO_POINT_SPAN; entity.CD_USAGE = obj.CD_USAGE; entity.IND_ACCT = obj.IND_ACCT; entity.IND_ACTION = obj.IND_ACTION; entity.IND_ON_OFF = obj.IND_ON_OFF; entity.QT_ACTION = obj.QT_ACTION; entity.CD_FACILITY = obj.CD_FACILITY; entity.CD_JOBCDPACKET = obj.CD_JOBCDPACKET; entity.HR_LBR = obj.HR_LBR; entity.CD_CREW_CLASS = obj.CD_CREW_CLASS; entity.CD_MU = obj.CD_MU; return(entity); }
public CuJobCode MapEntityToObject(TWMCUJOBCODE entity) { CuJobCode obj = new CuJobCode(); obj.CD_JOB = entity.CD_JOB; obj.CD_CU = entity.CD_CU; obj.NO_POINT = entity.NO_POINT; obj.NO_POINT_SPAN = entity.NO_POINT_SPAN; obj.CD_USAGE = entity.CD_USAGE; obj.IND_ACCT = entity.IND_ACCT; obj.IND_ACTION = entity.IND_ACTION; obj.IND_ON_OFF = entity.IND_ON_OFF; obj.QT_ACTION = entity.QT_ACTION; obj.CD_FACILITY = entity.CD_FACILITY; obj.CD_JOBCDPACKET = entity.CD_JOBCDPACKET; obj.HR_LBR = entity.HR_LBR; obj.CD_CREW_CLASS = entity.CD_CREW_CLASS; obj.CD_MU = entity.CD_MU; //obj.MilestoneRequirements = new MilestoneRequirementBl(dbManagerBase.iOrigin, dbManagerBase.iEnvironment).GetMilestoneRequirements(entity.TWMMILESTONERQMTs); return(obj); }
public CU TransformToCu(string workRequestId, CuJobCode obj) { CU cu = new CU(); cu.WorkRequest = workRequestId; cu.UnitCode = obj.CD_CU; cu.UnitAction = obj.IND_ACTION; cu.Account = obj.IND_ACCT; cu.PointNumber = obj.NO_POINT; cu.PointSpanNumber = obj.NO_POINT_SPAN; cu.Usage = obj.CD_USAGE; cu.OnOff = obj.IND_ON_OFF; cu.MUID = obj.CD_MU; cu.CrewClass = obj.CD_CREW_CLASS; cu.Quantity = Convert.ToInt16(obj.QT_ACTION).ToString(); cu.SupplyMethod = " "; cu.EquipNumber = " "; cu.UnitDetail = null; cu.CUFacilityAttributes = null; cu.LaborDetails = null; return(cu); }
public void Delete(CuJobCode obj) { unitOfWork.CuJobCodeRepo.Delete(obj.CD_JOB, obj.CD_MU, obj.CD_CU); unitOfWork.Save(); }
public void Update(CuJobCode obj) { UpdateRoot(obj); }
public void Insert(CuJobCode obj) { unitOfWork.CuJobCodeRepo.Insert(MapObjectToEntity(obj)); unitOfWork.Save(); }