Exemplo n.º 1
0
        public T_Report_Plastic toReportPlastic()
        {
            var pls = new T_Report_Plastic();

            pls.Code = this.Code;
            return(pls);
        }
Exemplo n.º 2
0
        public void ReportPlasticUpdate(out VM_Report_Plastic vmPls, T_Report_Plastic pls, T_Report_Header rh, T_Report_Footer rf)
        {
            vmPls = new VM_Report_Plastic();
            var bllValue = new MesWeb.BLL.T_Report_Value();

            vmPls.updateReportHeader(rh);
            vmPls.updateReportFooter(rf);
            vmPls.updateReportPlastic(pls);
            vmPls.updateAgingCondition(bllValue.GetModel(pls.AgingConditionId.Value));
            vmPls.updateElecRate(bllValue.GetModel(pls.ElecRateId.Value));
            vmPls.updateElecStrength(bllValue.GetModel(pls.ElecStrengthId.Value));
            vmPls.updateMpaBefore(bllValue.GetModel(pls.MpaBeforeId.Value));
            vmPls.updateElongBefore(bllValue.GetModel(pls.ElongBeforeId.Value));
            vmPls.updateMpaAfter(bllValue.GetModel(pls.MpaAfterId.Value));
            vmPls.updateElongAfter(bllValue.GetModel(pls.ElongAfterId.Value));
            vmPls.updateMpaRateMax(bllValue.GetModel(pls.MpaRateMaxId.Value));
            vmPls.updateElongRateMax(bllValue.GetModel(pls.ElongRateMaxId.Value));
            vmPls.updateAgingQualityLoss(bllValue.GetModel(pls.AgingQualityLossId.Value));
            vmPls.updateThermalStablityTime(bllValue.GetModel(pls.ThermalStablityTimeId.Value));
            vmPls.updateBittleImpactTest(bllValue.GetModel(pls.BittleImpactTestId.Value));
            vmPls.updateThermalDeformation(bllValue.GetModel(pls.ThermalDeformationId.Value));
            vmPls.updateOxyIndex(bllValue.GetModel(pls.OxyIndexId.Value));
            vmPls.updateSpecGravity(bllValue.GetModel(pls.SpecGravityId.Value));
            vmPls.updateShoreHBTest(bllValue.GetModel(pls.ShoreHBTestId.Value));
            vmPls.updateApperanceQuality(bllValue.GetModel(pls.ApperanceQualityId.Value));
            vmPls.updatePkgAndLabel(bllValue.GetModel(pls.PkgAndLabelId.Value));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 将前端塑料报告数据转换成持久层模型
        /// </summary>
        /// <param name="vmPlastic"></param>
        /// <returns></returns>
        private T_Report_Plastic toPlasticModel(VM_Report_Plastic vmPlastic)
        {
            T_Report_Plastic rp = null;
            var bllRvalue       = new MesWeb.BLL.T_Report_Value();
            var bllRheader      = new MesWeb.BLL.T_Report_Header();
            var bllFooter       = new MesWeb.BLL.T_Report_Footer();

            try {
                var headerId              = bllRheader.Add(vmPlastic.toReportHeader());
                var footerId              = bllFooter.Add(vmPlastic.toReportFooter());
                var elecRateId            = bllRvalue.Add(vmPlastic.toElecRateValue());
                var elecStrengthId        = bllRvalue.Add(vmPlastic.toElecStrengthValue());
                var mpaBeforeId           = bllRvalue.Add(vmPlastic.toMpaAfterValue());
                var elongBeforeId         = bllRvalue.Add(vmPlastic.toElongBeforeValue());
                var agingConditionId      = bllRvalue.Add(vmPlastic.toAgingConditionValue());
                var mpaAfterId            = bllRvalue.Add(vmPlastic.toMpaAfterValue());
                var elongAfterId          = bllRvalue.Add(vmPlastic.toElongAfterValue());
                var mpaRateMaxId          = bllRvalue.Add(vmPlastic.toMpaRateMaxValue());
                var elongRateMaxId        = bllRvalue.Add(vmPlastic.toElongRateMaxValue());
                var agingQualityLossId    = bllRvalue.Add(vmPlastic.toAgingQualityLossValue());
                var thermalStablityTimeId = bllRvalue.Add(vmPlastic.toThermalStablityTimeValue());
                var bittleImpactTestId    = bllRvalue.Add(vmPlastic.toBittleImpactTestValue());
                var thermalDeformationId  = bllRvalue.Add(vmPlastic.toThermalDeformationValue());
                var oxyIndexId            = bllRvalue.Add(vmPlastic.toOxyIndexValue());
                var specGravityId         = bllRvalue.Add(vmPlastic.toSpecGravityValue());
                var shoreHBTestId         = bllRvalue.Add(vmPlastic.toShoreHBTestValue());
                var apperanceQualityId    = bllRvalue.Add(vmPlastic.toApperanceQualityValue());
                var pkgAndLabeId          = bllRvalue.Add(vmPlastic.toPkgAndLabelValue());

                rp = new T_Report_Plastic();
                rp.AgingConditionId   = agingConditionId;
                rp.AgingQualityLossId = agingQualityLossId;
                rp.ApperanceQualityId = apperanceQualityId;
                rp.BittleImpactTestId = bittleImpactTestId;
                rp.Code                  = vmPlastic.Code;
                rp.ElecRateId            = elecRateId;
                rp.ElecStrengthId        = elecStrengthId;
                rp.ElongAfterId          = elongAfterId;
                rp.ElongBeforeId         = elongBeforeId;
                rp.ElongRateMaxId        = elongRateMaxId;
                rp.MpaAfterId            = mpaAfterId;
                rp.MpaBeforeId           = mpaBeforeId;
                rp.MpaRateMaxId          = mpaRateMaxId;
                rp.OxyIndexId            = oxyIndexId;
                rp.PkgAndLabelId         = pkgAndLabeId;
                rp.ReportFooterId        = footerId;
                rp.ReportHeaderId        = headerId;
                rp.ShoreHBTestId         = shoreHBTestId;
                rp.SpecGravityId         = specGravityId;
                rp.ThermalDeformationId  = thermalDeformationId;
                rp.ThermalStablityTimeId = thermalStablityTimeId;
            } catch (Exception e) {
                log = LogFactory.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.FullName + ":" + MethodBase.GetCurrentMethod().Name);
                log.Error(e);
            }

            return(rp);
        }
Exemplo n.º 4
0
 public void updateReportPlastic(T_Report_Plastic rp)
 {
     this.Code = rp.Code;
     this.Id   = rp.Id;
 }