duheng
2025-03-14 a906f71640d9ba5cd9f8d689a51de3a557d8bbff
WinFrmUI/PBS.WinFrmUI/02-facility/00-core/FacilitiesCtrl.cs
@@ -73,6 +73,8 @@
            this.textEditWaterModel.Properties.AddEnum(typeof(HStation.PBS.eSupplyMode));
            this.comboBoxWaterSupply.Properties.AddEnum(typeof(HStation.PBS.eWaterSupply));
            var allPackages = await new HStation.BLL.AssetsPackageMain().GetAll();
            var list = await new Yw.BLL.Division().GetAll();
            this.treeListLookUpEdit1TreeList.DataSource = list;
        }
        public void SetData(Vmo.FacilityVmo model)
@@ -87,6 +89,7 @@
            this.comboBoxWaterSupply.EditValue = model.WaterSupply;
            this.txtConstantP.EditValue = model.ConstantPressure;
            this.textEditWaterModel.EditValue = model.SupplyMode;
            this.txtEditRegion.EditValue = model.PlaceID;
        }
        //获取文本信息
@@ -103,6 +106,10 @@
            _facilityVmo.ConstantPressure = double.Parse(txtConstantP.Text);
            _facilityVmo.MaxWaterDemand = Convert.ToDouble(txtMaxWaterDemand.EditValue);
            _facilityVmo.TerminalPressure = Convert.ToDouble(txtWaterPressure.EditValue);
            if (this.txtEditRegion.EditValue != null)
            {
                _facilityVmo.PlaceID = Convert.ToInt64(this.txtEditRegion.EditValue);
            }
            if (comboBoxWaterSupply.EditValue != null)
            {
                _facilityVmo.WaterSupply = (HStation.PBS.eWaterSupply)comboBoxWaterSupply.EditValue;