From 3f24b14f07ef82526b2e1d56cc808f226e91cbb9 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期五, 20 十二月 2024 21:47:33 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 Service/HStation.Service.Xhs.Core/05-service/01-project/XhsProject.cs |   35 ++++++++++++-----------------------
 1 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/Service/HStation.Service.Xhs.Core/05-service/01-project/XhsProject.cs b/Service/HStation.Service.Xhs.Core/05-service/01-project/XhsProject.cs
index cc9042b..50d5371 100644
--- a/Service/HStation.Service.Xhs.Core/05-service/01-project/XhsProject.cs
+++ b/Service/HStation.Service.Xhs.Core/05-service/01-project/XhsProject.cs
@@ -114,6 +114,15 @@
         }
 
         /// <summary>
+        /// 鑾峰彇鏁伴噺
+        /// </summary>
+        public int GetCount()
+        {
+            var all = GetAll();
+            return all.Count;
+        }
+
+        /// <summary>
         /// 閫氳繃 ID 鑾峰彇瀛愮骇鍙婅嚜韬�
         /// </summary>
         public List<Model.XhsProject> GetChildAndSelfByID(long ID)
@@ -539,36 +548,16 @@
         public bool DeleteByID(long ID, out string Msg)
         {
             Msg = string.Empty;
-            var serviceProjectSite = new HStation.Service.XhsProjectSite();
-            if (serviceProjectSite.IsExistTable())
+            if (new XhsProjectSite().IsExistByProjectID(ID))
             {
-                if (serviceProjectSite.IsExistByProjectID(ID))
-                {
-                    Msg = "瀛樺湪绔欑偣淇℃伅";
-                    return false;
-                }
+                Msg = "瀛樺湪绔欑偣淇℃伅";
+                return false;
             }
             var dal = DALCreateHelper.CreateDAL<HStation.DAL.IXhsProject>();
             var bol = dal.DeleteByID(ID);
             if (bol)
             {
                 RemoveCache(ID);
-            }
-            return bol;
-        }
-
-        /// <summary>
-        /// 閫氳繃 ID 鍒犻櫎(鍚屾椂鍒犻櫎 Site)
-        /// </summary>
-        public bool DeleteExByID(long ID, out string Msg)
-        {
-            Msg = string.Empty;
-            var dal = DALCreateHelper.CreateDAL<HStation.DAL.IXhsProject>();
-            var bol = dal.DeleteExByID(ID);
-            if (bol)
-            {
-                RemoveCache(ID);
-                XhsProjectSite.RemoveCacheByProjectID(ID);
             }
             return bol;
         }

--
Gitblit v1.9.3