From 2cc4dfef234b47bef364edf798b5051a25f33217 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期五, 30 八月 2024 10:58:56 +0800
Subject: [PATCH] 1

---
 WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs
index 90931c6..d6446e1 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_MenuService.cs
@@ -146,7 +146,8 @@
                 bool _changed = false;
                 if (menu.MenuId <= 0)
                 {
-                    BaseDal.AddData(menu);
+                    int id = BaseDal.AddData(menu);
+                    menu.MenuId = id;
                 }
                 else
                 {
@@ -173,5 +174,17 @@
             return webResponse;
 
         }
+
+        public WebResponseContent DelMenu(int menuId)
+        {
+            WebResponseContent webResponse = new WebResponseContent();
+            if(BaseDal.QueryFirst(x=>x.ParentId == menuId) != null)
+            {
+                return webResponse = WebResponseContent.Instance.Error("褰撳墠鑿滃崟瀛樺湪瀛愯彍鍗�,璇峰厛鍒犻櫎瀛愯彍鍗�!");
+            }
+            BaseDal.DeleteDataById(menuId);
+
+            return webResponse = WebResponseContent.Instance.OK("鍒犻櫎鎴愬姛");
+        }
     }
 }

--
Gitblit v1.9.3