From 1e5868571fdeb64bead897396ed38b44eda1bcaa Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期五, 27 九月 2024 15:03:20 +0800 Subject: [PATCH] Elbows 修改 --- WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs | 21 +++++++++------------ 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs index 8aa9819..6ff2079 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 { @@ -50,9 +51,8 @@ private void listBoxControl1_SelectedIndexChanged(object sender, EventArgs e) { var currentID = this.GetCurrentID(); - if (currentID == null) + if (currentID <= 0) { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); return; } FocusedChangedEvent.Invoke(currentID); @@ -63,10 +63,10 @@ //妫�绱� private void barCkSearch_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - /* if (this.barCkSearch.Checked) - this.listBoxControl1.ShowFindPanel(); - else - this.listBoxControl1.HideFindPanel();*/ + if (this.barCkSearch.Checked) + layoutControlItemSearch.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; + else + layoutControlItemSearch.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; } #endregion 鑿滃崟浜嬩欢 @@ -137,12 +137,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); -- Gitblit v1.9.3