| | |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | public event Func<Vmo.PumpGroupVmo, Task<bool>> ReloadDataEvent = null; |
| | | public event Func<Vmo.AssetsPumpGroupVmo, Task<bool>> ReloadDataEvent = null; |
| | | |
| | | private Vmo.PumpGroupVmo _UpdataePumpGroupDto = null; |
| | | private Vmo.AssetsPumpGroupVmo _UpdataeAssetsPumpGroupDto = null; |
| | | |
| | | public void SetBindingData(Vmo.PumpGroupVmo groupvmo) |
| | | public void SetBindingData(Vmo.AssetsPumpGroupVmo groupvmo) |
| | | { |
| | | _UpdataePumpGroupDto = groupvmo; |
| | | this.NameTextEdit.Text = _UpdataePumpGroupDto.Name; |
| | | this.DescriptionTextEdit.Text = _UpdataePumpGroupDto.Description; |
| | | this.TagNameTextEdit.Text = _UpdataePumpGroupDto.TagName; |
| | | _UpdataeAssetsPumpGroupDto = groupvmo; |
| | | this.NameTextEdit.Text = _UpdataeAssetsPumpGroupDto.Name; |
| | | this.DescriptionTextEdit.Text = _UpdataeAssetsPumpGroupDto.Description; |
| | | this.TagNameTextEdit.Text = _UpdataeAssetsPumpGroupDto.TagName; |
| | | } |
| | | |
| | | //数据验证 |
| | |
| | | //完成 |
| | | private async void BtnOk_ClickAsync(object sender, EventArgs e) |
| | | { |
| | | _UpdataePumpGroupDto.TagName = TagNameTextEdit.Text.Trim(); |
| | | _UpdataePumpGroupDto.Name = NameTextEdit.Text.Trim(); |
| | | _UpdataePumpGroupDto.Description = DescriptionTextEdit.Text.Trim(); |
| | | if (await this.ReloadDataEvent.Invoke(_UpdataePumpGroupDto)) |
| | | _UpdataeAssetsPumpGroupDto.TagName = TagNameTextEdit.Text.Trim(); |
| | | _UpdataeAssetsPumpGroupDto.Name = NameTextEdit.Text.Trim(); |
| | | _UpdataeAssetsPumpGroupDto.Description = DescriptionTextEdit.Text.Trim(); |
| | | if (await this.ReloadDataEvent.Invoke(_UpdataeAssetsPumpGroupDto)) |
| | | { |
| | | MessageBoxHelper.ShowSuccess("编辑成功!"); |
| | | } |