public TWMIFEXTDSGN_FAC MapObjectToFacIfEntity(IFExtDsgnFacAtt fa, ExtDesignKey key) { TWMIFEXTDSGN_FAC entity = new TWMIFEXTDSGN_FAC(); entity.CD_SEQ_EXTDSGN = GetIfSequenceNo2(); entity.TS_EXTDSGN = key.TsExtDsgn; entity.ID_OPER = key.IdOper; entity.NO_FACILITY = (long)key.ExtDsgnFacAttSeq; entity.CD_SEQ = fa.SequenceCode; entity.TXT_FAC_VALUE = fa.FacilityValueText; entity.CD_ATTRIBUTE = fa.AttributeCode; entity.FG_ERROR = "N"; entity.CD_SEQ_ERROR_RUN = 0; return(entity); }
public TWMIFEXTDSGN_FAC MapObjectToEntity(IFExtDsgnFacAtt obj) { if (obj != null) { return(new TWMIFEXTDSGN_FAC { CD_ATTRIBUTE = obj.AttributeCode, NO_FACILITY = obj.FacilityNumber, TXT_FAC_VALUE = obj.FacilityValueText.Trim(), CD_SEQ_EXTDSGN = obj.ExternalDesignSequence, ID_OPER = obj.OperatorId, TS_EXTDSGN = obj.ExternalDesignTimeStamp, CD_SEQ_ERROR_RUN = obj.ErrorRunSequence, FG_ERROR = obj.ErrorFlag, CD_SEQ = obj.SequenceCode }); } return(null); }
public void Create(IFExtDsgnFacAtt obj) { unitOfWork.IfExtDesignFacRepo.Insert(MapObjectToEntity(obj)); unitOfWork.Save(); }