| | |
| | | } |
| | | _vmo = new Vmo.AssetsThreelinkMainVmo(vmo); |
| | | this.txtName.EditValue = vmo.Name; |
| | | this.TextEditMinorLoss.EditValue = vmo.MinorLoss; |
| | | this.txtKeyWord.EditValue = HStation.Service.Assets.KeyWordHelper.ToString(vmo.KeyWords); |
| | | var flags = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(HStation.Assets.DataType.ThreelinkMain); |
| | | this.setFlagsEditCtrl1.SetBindingData(flags?.Select(x => x.Name).ToList(), vmo.Flags); |
| | |
| | | this.dxErrorProvider1.SetError(this.txtName, "必填项"); |
| | | return false; |
| | | } |
| | | if (string.IsNullOrEmpty(this.TextEditMinorLoss.Text.Trim())) |
| | | if (string.IsNullOrEmpty(this.textEditBranchThroughCoefficient.Text.Trim())) |
| | | { |
| | | this.dxErrorProvider1.SetError(this.TextEditMinorLoss, "必填项"); |
| | | this.dxErrorProvider1.SetError(this.textEditBranchThroughCoefficient, "必填项"); |
| | | return false; |
| | | } |
| | | if (string.IsNullOrEmpty(this.textEditRunThroughCoefficient.Text.Trim())) |
| | | { |
| | | this.dxErrorProvider1.SetError(this.textEditRunThroughCoefficient, "必填项"); |
| | | return false; |
| | | } |
| | | var tagname = this.txtTagName.Text.Trim(); |
| | |
| | | return; |
| | | } |
| | | _vmo.Name = this.txtName.Text.Trim(); |
| | | _vmo.MinorLoss = double.Parse(this.TextEditMinorLoss.EditValue?.ToString()); |
| | | _vmo.KeyWords = HStation.Service.Assets.KeyWordHelper.ToList(this.txtKeyWord.Text.Trim()); |
| | | _vmo.Flags = this.setFlagsEditCtrl1.SelectedFlagList; |
| | | _vmo.TagName = this.txtTagName.Text.Trim(); |