Example #1
0
        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);
        }
Example #2
0
        public TWMIFEXTDSGN_FAC MapObjectToIfEntity(CUFacilityAttribute fa, ExtDesignKey key)
        {
            TWMIFEXTDSGN_FAC entity = new TWMIFEXTDSGN_FAC();

            entity.CD_SEQ_EXTDSGN   = GetIfSequenceNo2();
            entity.TS_EXTDSGN       = key.TsExtDsgn;              //PK
            entity.ID_OPER          = key.IdOper;                 //PK
            entity.NO_FACILITY      = (long)key.ExtDsgnFacAttSeq; //PK -- seq generated
            entity.CD_SEQ           = fa.IdSeq;                   //PK
            entity.TXT_FAC_VALUE    = fa.Value;
            entity.CD_ATTRIBUTE     = fa.AttributeName;           //PK
            entity.FG_ERROR         = "N";
            entity.CD_SEQ_ERROR_RUN = null;

            return(entity);
        }
Example #3
0
 public IFExtDsgnFacAtt MapEntityToObject(TWMIFEXTDSGN_FAC obj)
 {
     if (obj != null)
     {
         return(new IFExtDsgnFacAtt
         {
             AttributeCode = obj.CD_ATTRIBUTE,
             FacilityNumber = obj.NO_FACILITY,
             FacilityValueText = obj.TXT_FAC_VALUE,
             SequenceCode = obj.CD_SEQ,
             ErrorRunSequence = obj.CD_SEQ_ERROR_RUN,
             ExternalDesignSequence = obj.CD_SEQ_EXTDSGN,
             ExternalDesignTimeStamp = obj.TS_EXTDSGN,
             OperatorId = obj.ID_OPER,
             ErrorFlag = obj.FG_ERROR
         });
     }
     return(null);
 }
Example #4
0
 public IFExtDsgnFacAtt GetByEntity(TWMIFEXTDSGN_FAC entity)
 {
     return(MapEntityToObject(entity));
 }