Ejemplo n.º 1
0
        /// <summary>
        /// To model
        /// </summary>
        /// <param name="pObj"></param>
        /// <returns></returns>
        public MMRs ToModel(MR pObj)
        {
            try
            {
                var _model = new MMRs
                {
                    ACOD = pObj.AssetCode,
                    AGRP = pObj.AssetGroup,
                    AIID = pObj.AssetItemId,
                    ANAM = pObj.AssetName,
                    BUNT = pObj.BusinessUnit,
                    DPRT = pObj.Department,
                    EMID = pObj.EmployeeId,
                    FNAM = pObj.FirstName,
                    LNAM = pObj.LastName,
                    MRID = pObj.MRId,
                    PSTN = pObj.Position,
                    RMRK = pObj.Remarks,
                    SNAM = pObj.SerialNumber,
                    TDAT = pObj.TransDate,
                    ASTA = pObj.AssetStatus
                };

                return(_model);
            }
            catch (Exception ex) { throw ex; }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// To binding
 /// </summary>
 /// <param name="pObj"></param>
 /// <returns></returns>
 public MR ToBinding(MMRs pObj)
 {
     try
     {
         var _binding = new MR
         {
             AssetCode    = pObj.ACOD,
             AssetGroup   = pObj.AGRP,
             AssetItemId  = pObj.AIID,
             AssetName    = pObj.ANAM,
             BusinessUnit = pObj.BUNT,
             Department   = pObj.DPRT,
             EmployeeId   = pObj.EMID,
             FirstName    = pObj.FNAM,
             LastName     = pObj.LNAM,
             MRId         = pObj.MRID,
             Position     = pObj.PSTN,
             Remarks      = pObj.RMRK,
             SerialNumber = pObj.SNAM,
             TransDate    = pObj.TDAT,
             AssetStatus  = pObj.ASTA
         };
         return(_binding);
     }
     catch (Exception ex) { throw ex; }
 }