From aae6a1a9df5b1860513f6caadc8cfd7d854c2862 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期四, 25 三月 2021 13:32:02 +0800
Subject: [PATCH] 新增模具管理文件夹 一个控制器

---
 WebAPI/Controllers/WebAPIController.cs |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index a811605..8e6f6a2 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -329,6 +329,33 @@
         }
 
 
+        //鍒犻櫎琛ㄨ褰�
+        [Route("Web/Delete_Table")]
+        [HttpGet]
+        public object Delete_Table(string sqlStr)
+        {
+            try
+            {
+                //SQLHelper oCn;
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                oCN.RunProc(sqlStr);
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎澶辫触锛佸紓甯�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+        }
+
         #region 鍩虹璧勬枡
         /// <summary>
         /// 鑾峰彇浠撳簱鍒楄〃
@@ -721,6 +748,37 @@
                 return objjson;
             }
         }
+
+        /// <summary>
+        /// 鑾峰彇褰撳墠鏁版嵁搴撳悕
+        /// </summary>
+        /// <returns></returns>
+        [Route("Web/GetDataBases")]
+        [HttpGet]
+        public object GetDataBases()
+        {
+            try
+            {
+                ClsCN oCn = new ClsCN();
+                DataSet oDs = new DataSet();
+                //==========
+                oDs = oCn.RunProcReturn("Select Name From Master..SysDataBases Where DbId=(Select Dbid From Master..SysProcesses Where Spid = @@spid)", "SysDataBases");
+                objjson.code = "1";
+                objjson.count = 1;
+                objjson.Message = "鑾峰彇鎴愬姛锛�";
+                objjson.data = oDs.Tables[0];
+                return objjson; ;
+            }
+            catch (Exception e)
+            {
+
+                objjson.code = "0";
+                objjson.count = 0;
+                objjson.Message = "鑾峰彇澶辫触锛佸紓甯�" + e.ToString();
+                objjson.data = null;
+                return objjson; ;
+            }
+        }
         #endregion
     }
 

--
Gitblit v1.9.1