From abf1e3b3334ab47c38aa92405a11a6ec92b7847a Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期四, 31 十月 2024 17:18:37 +0800 Subject: [PATCH] bimface 水流 --- WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs index bd085c0..af16622 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs @@ -1,4 +1,5 @@ 锘縰sing DevExpress.XtraEditors; +using Yw; namespace HStation.WinFrmUI.Basic { @@ -76,7 +77,6 @@ var currentVm = this.listBoxControl1.GetCurrentViewModel(_allBindingList); if (currentVm == null) { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); return default; } return currentVm.ID; @@ -136,12 +136,9 @@ } if (MessageBoxHelper.IsClickOk("纭鍒犻櫎鏁版嵁琛�?", "鎻愮ず")) return; - if (await _bll.IsExistByModuleID(currentVm.ID)) - { - MessageBoxHelper.ShowWarning("瀛樺湪绯荤粺绫诲瀷,涓嶅彲鍒犻櫎!"); - return; - } - var result = await _bll.DeleteByID(currentVm.ID); + + var result = await BLLFactory<Yw.BLL.SysModule>.Instance.DeleteByID(currentVm.ID); + if (result) { _allBindingList.Remove(currentVm); @@ -155,5 +152,10 @@ return; } } + + private void barBtnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.SetBindingData(); + } } } \ No newline at end of file -- Gitblit v1.9.3