From 5e789cd1ae9a9b22a6ab66a970457c372e9001de Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期五, 18 十月 2024 11:15:31 +0800
Subject: [PATCH] 增加资产匹配需要的额外约束字段,增加基础模块的排序功能(未完成)

---
 WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Basic/00-SysTypeManage/SysModuleListBoxCtrl.cs
index 8aa9819..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
 {
@@ -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 鑿滃崟浜嬩欢
@@ -77,7 +77,6 @@
             var currentVm = this.listBoxControl1.GetCurrentViewModel(_allBindingList);
             if (currentVm == null)
             {
-                MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒");
                 return default;
             }
             return currentVm.ID;
@@ -137,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);
@@ -156,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