From 59e5e0bf989993c0dce1851e34bcbe4bfb42ed56 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 25 十月 2024 15:53:21 +0800 Subject: [PATCH] 增加空压机管理和换热器管理 --- 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