| | |
| | | _vmo.SeriesID = series.ID; |
| | | var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.ValveMain); |
| | | this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), null); |
| | | this.TextEditType.Properties.AddEnum(typeof(HStation.Assets.eValveType)); |
| | | this.TextEditType.SelectedIndex = 0; |
| | | if (_last != null) |
| | | { |
| | | this.txtName.EditValue = _last.Name; |
| | |
| | | if (string.IsNullOrEmpty(this.txtCoefficient.Text.Trim())) |
| | | { |
| | | this.dxErrorProvider1.SetError(this.txtCoefficient, "必填项"); |
| | | return false; |
| | | } |
| | | if (string.IsNullOrEmpty(this.TextEditType.Text.Trim())) |
| | | { |
| | | this.dxErrorProvider1.SetError(this.TextEditType, "必填项"); |
| | | return false; |
| | | } |
| | | var tagname = this.txtTagName.Text.Trim(); |
| | |
| | | _vmo.Material = this.txtMaterial.Text.Trim(); |
| | | _vmo.Caliber = this.txtCaliber.EditValue == null ? null : double.Parse(this.txtCaliber.EditValue?.ToString()); |
| | | _vmo.MinorLoss = double.Parse(this.txtCoefficient.EditValue?.ToString()); |
| | | if (Enum.TryParse(Convert.ToString(TextEditType.EditValue), true, out HStation.Assets.eValveType valvetype)) |
| | | { |
| | | _vmo.ValveType = valvetype; |
| | | } |
| | | _vmo.KeyWords = HStation.Service.Assets.KeyWordHelper.ToList(this.txtKeyWord.Text.Trim()); |
| | | _vmo.Flags = this.setFlagsEditCtrl1.SelectedFlagList; |
| | | _vmo.TagName = this.txtTagName.Text.Trim(); |