| | |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | this.Load += AddAssetsExchangerSeriesDlg_Load; |
| | | } |
| | | |
| | | public event Func<Vmo.AssetsExchangerSeriesVmo, Task<bool>> ReloadDataEvent = null; |
| | | public event Func<Vmo.AssetsExchangerSeriesVmo, object, Task<bool>> ReloadDataEvent = null; |
| | | |
| | | private List<AssetsExchangerSeriesViewModel> _assetsExchangerSeriesViews; |
| | | |
| | | //初始化 |
| | | private async void AddAssetsExchangerSeriesDlg_Load(object sender, EventArgs e) |
| | | { |
| | | _assetsExchangerSeriesViews = new List<AssetsExchangerSeriesViewModel>(); |
| | | var allList = await new BLL.AssetsExchangerSeries().GetAll(); |
| | | foreach (var item in allList) |
| | | { |
| | | _assetsExchangerSeriesViews.Add(new AssetsExchangerSeriesViewModel(item)); |
| | | } |
| | | treeListLookUpEdit1TreeList.DataSource = _assetsExchangerSeriesViews; |
| | | } |
| | | |
| | | //数据验证 |
| | | private bool Valid() |
| | |
| | | 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("添加成功!"); |
| | | } |