From 0cd48df8ccca96a8a0117a508c342a90dc2eacb8 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期五, 08 十一月 2024 13:07:43 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- 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