From 208ca42e1c20afafbe48d66259d553ee81eb48ed Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期三, 13 十一月 2024 11:02:43 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/HStation.WinFrmUI.Assets.Core/07-fourLink/01-series/FourLinkTreeListCtrl.cs | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/07-fourLink/01-series/PipeLineTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/07-fourLink/01-series/FourLinkTreeListCtrl.cs similarity index 86% rename from WinFrmUI/HStation.WinFrmUI.Assets.Core/07-fourLink/01-series/PipeLineTreeListCtrl.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/07-fourLink/01-series/FourLinkTreeListCtrl.cs index 1cb96f9..bd6eb5d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/07-fourLink/01-series/PipeLineTreeListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/07-fourLink/01-series/FourLinkTreeListCtrl.cs @@ -1,5 +1,6 @@ 锘縰sing DevExpress.XtraEditors; using Yw; +using Yw.Untity; namespace HStation.WinFrmUI.Assets { @@ -50,8 +51,13 @@ private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddAssetsFourlinkSeriesDlg(); - dlg.ReloadDataEvent += async (rhs) => + dlg.ReloadDataEvent += async (rhs, currentId) => { + if (currentId != null) + { + var select = await _bll.GetByID(Convert.ToInt64(currentId)); + rhs.ParentIds = TreeParentIdsHelper.GetChildParentIds(select.ID, select.ParentIds); + } var bll = new BLL.AssetsFourlinkSeries(); var id = await bll.Insert(rhs); if (id > 0) @@ -72,7 +78,7 @@ var vm = this.treeList1.GetCurrentViewModel(_allBindingList); if (vm == null) { - return; + return; } ReloadEvent.Invoke(vm.ID); } @@ -91,8 +97,13 @@ if (AssetsFourlinkSeries == null) return; dlg.SetBindingData(AssetsFourlinkSeries); - dlg.ReloadDataEvent += async (rhs) => + dlg.ReloadDataEvent += async (rhs, currentId) => { + if (currentId != null) + { + var select = await _bll.GetByID(Convert.ToInt64(currentId)); + rhs.ParentIds = TreeParentIdsHelper.GetChildParentIds(select.ID, select.ParentIds); + } if (await BLLFactory<BLL.AssetsFourlinkSeries>.Instance.Update(rhs)) { vm.Reset(rhs); -- Gitblit v1.9.3