示例#1
0
        public CostAdjustment MapEntityToObject(TWMCOSTINFORMATION entity)
        {
            if (entity != null)
            {
                CostAdjustment obj = new CostAdjustment();

                obj.WorkRequestId                   = entity.CD_WR;
                obj.District                        = entity.CD_DIST;
                obj.Entity                          = entity.CD_ENTITY;
                obj.AmountAnnualRevEst              = entity.AMT_ANNUAL_REV_EST;
                obj.AmountFixedBid                  = entity.AMT_FIXED_BID;
                obj.MultiplierAmountLaborCompany    = entity.MLT_AMT_LBR_CMPNY;
                obj.MultiplierAmountLaborContractor = entity.MLT_AMT_LBR_CNTCR;
                obj.MultiplierAmountMaterial        = entity.MLT_AMT_MATL;
                obj.MultiplierHoursLaborCompany     = entity.MLT_HR_LBR_CMPNY;

                obj.QuantityAfudcMonths = entity.QT_AFUDC_MONTHS;
                obj.NoAsbDesign         = entity.NO_ASB_DESIGN;
                obj.BidItem             = entity.CD_BID_ITEM;
                obj.QuantityBidItem     = entity.QT_BID_ITEM;


                return(obj);
            }

            return(null);
        }
示例#2
0
        public TWMCOSTINFORMATION MapObjectToEntity(CostAdjustment obj)
        {
            if (obj != null)
            {
                return(new TWMCOSTINFORMATION
                {
                    CD_WR = obj.WorkRequestId,
                    CD_DIST = obj.District,
                    CD_ENTITY = obj.Entity,

                    AMT_ANNUAL_REV_EST = obj.AmountAnnualRevEst,
                    AMT_FIXED_BID = obj.AmountFixedBid,

                    MLT_AMT_LBR_CMPNY = obj.MultiplierAmountLaborCompany,
                    MLT_AMT_LBR_CNTCR = obj.MultiplierAmountLaborContractor,
                    MLT_AMT_MATL = obj.MultiplierAmountMaterial,
                    MLT_HR_LBR_CMPNY = obj.MultiplierHoursLaborCompany,

                    //QT_AFUDC_MONTHS = obj.QuantityAfudcMonths,
                    NO_ASB_DESIGN = obj.NoAsbDesign,
                    CD_BID_ITEM = obj.BidItem,
                    QT_BID_ITEM = obj.QuantityBidItem
                });
            }
            return(null);
        }
示例#3
0
        public void Update(CostAdjustment obj)
        {
            var ca = unitOfWork.CostInformationRepo.GetSingle(m => m.CD_WR == obj.WorkRequestId);

            ca.CD_WR              = obj.WorkRequestId;
            ca.CD_DIST            = obj.District;
            ca.CD_ENTITY          = obj.Entity;
            ca.AMT_ANNUAL_REV_EST = obj.AmountAnnualRevEst;
            ca.AMT_FIXED_BID      = obj.AmountFixedBid;
            ca.MLT_AMT_LBR_CMPNY  = obj.MultiplierAmountLaborCompany;
            ca.MLT_AMT_LBR_CNTCR  = obj.MultiplierAmountLaborContractor;
            ca.MLT_AMT_MATL       = obj.MultiplierAmountMaterial;
            ca.MLT_HR_LBR_CMPNY   = obj.MultiplierHoursLaborCompany;
            ca.QT_AFUDC_MONTHS    = Convert.ToInt16(obj.QuantityAfudcMonths);
            ca.NO_ASB_DESIGN      = obj.NoAsbDesign;
            ca.CD_BID_ITEM        = obj.BidItem;
            ca.QT_BID_ITEM        = obj.QuantityBidItem;

            UpdateCostAdjustment(ca);
        }
示例#4
0
 public void Create(CostAdjustment obj)
 {
     CreateCostAdjustment(MapObjectToEntity(obj));
 }