| | |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | public event Func<Vmo.AssetsValveSeriesVmo, Task<bool>> ReloadDataEvent = null; |
| | | public event Func<Vmo.AssetsValveSeriesVmo, object, Task<bool>> ReloadDataEvent = null; |
| | | |
| | | private List<AssetsValveSeriesViewModel> _assetsValveSeriesViews; |
| | | |
| | | //初始化 |
| | | private void AddAssetsValveSeriesDlg_Load(object sender, EventArgs e) |
| | | private async void AddAssetsValveSeriesDlg_Load(object sender, EventArgs e) |
| | | { |
| | | TextEditType.Properties.AddEnum(typeof(HStation.Assets.eValveType)); |
| | | _assetsValveSeriesViews = new List<AssetsValveSeriesViewModel>(); |
| | | var allList = await new BLL.AssetsValveSeries().GetAll(); |
| | | foreach (var item in allList) |
| | | { |
| | | _assetsValveSeriesViews.Add(new AssetsValveSeriesViewModel(item)); |
| | | } |
| | | treeListLookUpEdit1TreeList.DataSource = _assetsValveSeriesViews; |
| | | } |
| | | |
| | | //数据验证 |
| | |
| | | model.Name = NameTextEdit.Text; |
| | | model.TagName = TagNameTextEdit.Text; |
| | | model.Description = DescriptionTextEdit.Text; |
| | | if (await this.ReloadDataEvent.Invoke(model)) |
| | | if (await this.ReloadDataEvent.Invoke(model, this.TextEditParentList.EditValue)) |
| | | { |
| | | TipFormHelper.ShowSucceed("添加成功!"); |
| | | } |