| | |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | public event Func<Vmo.AssetsValveSeriesVmo, string, Task<bool>> ReloadDataEvent = null; |
| | | public event Func<Vmo.AssetsValveSeriesVmo, object, Task<bool>> ReloadDataEvent = null; |
| | | |
| | | private List<AssetsValveSeriesViewModel> _assetsValveSeriesViews; |
| | | |
| | |
| | | model.Name = NameTextEdit.Text; |
| | | model.TagName = TagNameTextEdit.Text; |
| | | model.Description = DescriptionTextEdit.Text; |
| | | if (await this.ReloadDataEvent.Invoke(model, TextEditParentList.EditValue.ToString())) |
| | | if (await this.ReloadDataEvent.Invoke(model, this.TextEditParentList.EditValue)) |
| | | { |
| | | TipFormHelper.ShowSucceed("添加成功!"); |
| | | } |
| | |
| | | var dlg = new AddAssetsValveSeriesDlg(); |
| | | dlg.ReloadDataEvent += async (rhs, currentId) => |
| | | { |
| | | var select = await _bll.GetByID(Convert.ToInt64(currentId)); |
| | | rhs.ParentIds = TreeParentIdsHelper.GetChildParentIds(select.ID, select.ParentIds); |
| | | if (currentId != null) |
| | | { |
| | | var select = await _bll.GetByID(Convert.ToInt64(currentId)); |
| | | rhs.ParentIds = TreeParentIdsHelper.GetChildParentIds(select.ID, select.ParentIds); |
| | | } |
| | | var bll = new BLL.AssetsValveSeries(); |
| | | var id = await bll.Insert(rhs); |
| | | if (id > 0) |