From ad8f813f5eddd66740b4e09801e4ea02ddf70a4a Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期三, 19 二月 2025 15:58:22 +0800
Subject: [PATCH] 继续优化报表

---
 WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuMgrPage.cs |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuMgrPage.cs
index 083b03a..bd1d47e 100644
--- a/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuMgrPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuMgrPage.cs
@@ -21,6 +21,8 @@
         {
             InitializeComponent();
             this.treeList1.InitialMultiColSettings(30);
+            this.PageTitle.Caption = "鑿滃崟绠$悊";
+            this.PageTitle.SvgImageSize = new Size(24, 24);
         }
 
         private List<MenuViewModel> _allBindingList = null;//缁戝畾鍒楄〃
@@ -32,7 +34,7 @@
         /// </summary>
         public override async void InitialDataSource()
         {
-            var allList = await new Yw.BLL.ProjectMenu().GetByProjectID(1);
+            var allList = await new Yw.BLL.ProjectMenu().GetByProjectID(GlobalParas._GlobalParas.ProjectID);
             _allBindingList = new List<MenuViewModel>();
             if (allList != null)
             {
@@ -45,7 +47,12 @@
             this.menuViewModelBindingSource.DataSource = _allBindingList;
             this.menuViewModelBindingSource.ResetBindings(false);
             //  this.treeList1.ForceInitialize();
-            //this.treeList1.CollapseAll();
+            this.treeList1.ExpandAll();
+        }
+
+        public override void VerifyAuth()
+        {
+            this.AuthTree.VerifyAuth(this.ribbonControl1);
         }
 
         //娣诲姞
@@ -53,11 +60,12 @@
         {
             if (_allBindingList == null)
                 return;
+            var row = this.treeList1.GetCurrentViewModel(_allBindingList);
             var dlg = new AddMenuDlg();
-            dlg.SetBindingData();
+            dlg.SetBindingData(row != null ? row.ID : 0);
             dlg.ReloadDataEvent += async (rhs) =>
             {
-                var id = await _bll.Insert(rhs);
+                var id = await _bll.InsertEx(rhs);
                 if (id > 0)
                 {
                     rhs.ID = id;

--
Gitblit v1.9.3