| | |
| | | |
| | | public async Task SetBindingData() |
| | | { |
| | | this.textEditWaterModel.Properties.AddEnum(typeof(HStation.PBS.eSupplyMode)); |
| | | this.comboBoxWaterSupply.Properties.AddEnum(typeof(HStation.PBS.eWaterSupply)); |
| | | this.textEditWaterModel.Properties.AddEnum(typeof(PBS.eSupplyMode)); |
| | | this.comboBoxWaterSupply.Properties.AddEnum(typeof(PBS.eWaterSupply)); |
| | | var allPackages = await new HStation.BLL.AssetsPackageMain().GetAll(); |
| | | foreach (var item in allPackages) |
| | | { |
| | |
| | | } |
| | | var list = await new PBS.BLL.Place().GetAll(); |
| | | this.treeListLookUpEdit1TreeList.DataSource = list; |
| | | this.imageComboBoxConnectionType.Properties.AddEnum(typeof(PBS.eConnectionType)); |
| | | this.imageComboBoxConnectionType.SelectedIndex = 1; |
| | | } |
| | | |
| | | public void SetData(Vmo.FacilityVmo model) |
| | |
| | | this.textEditWaterModel.EditValue = model.SupplyMode; |
| | | this.txtEditPlace.EditValue = model.PlaceID; |
| | | this.comboBoxPackages.EditValue = model.PackageID; |
| | | this.imageComboBoxConnectionType.EditValue = model.ConnectionType; |
| | | this.textEditConnectionAddress.EditValue = model.ConnectionAddress; |
| | | this.textEditMaxHeight.EditValue = model.MaxHeight; |
| | | } |
| | | |
| | | //获取文本信息 |
| | |
| | | _facilityVmo.Name = txtName.Text; |
| | | if (this.textEditWaterModel.EditValue != null) |
| | | { |
| | | _facilityVmo.SupplyMode = (HStation.PBS.eSupplyMode)this.textEditWaterModel.EditValue; |
| | | _facilityVmo.SupplyMode = (PBS.eSupplyMode)this.textEditWaterModel.EditValue; |
| | | } |
| | | _facilityVmo.UseStatus = Yw.Vmo.eUseStatus.Enable; |
| | | _facilityVmo.FloorHeight = double.Parse(txtFloorHeight.Text); |
| | |
| | | } |
| | | if (comboBoxWaterSupply.EditValue != null) |
| | | { |
| | | _facilityVmo.WaterSupply = (HStation.PBS.eWaterSupply)comboBoxWaterSupply.EditValue; |
| | | _facilityVmo.WaterSupply = (PBS.eWaterSupply)comboBoxWaterSupply.EditValue; |
| | | } |
| | | if (this.imageComboBoxConnectionType.EditValue != null) |
| | | { |
| | | _facilityVmo.ConnectionType = (PBS.eConnectionType)this.imageComboBoxConnectionType.EditValue; |
| | | } |
| | | _facilityVmo.ConnectionAddress = this.textEditConnectionAddress.Text; |
| | | if (this.textEditMaxHeight.EditValue != null) |
| | | { |
| | | double.TryParse(this.textEditMaxHeight.Text, out double maxHeight); |
| | | _facilityVmo.MaxHeight = maxHeight; |
| | | } |
| | | return _facilityVmo; |
| | | } |