From e6638d5c879b46a07c1e22f6d03ef77331a25fb3 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 11 八月 2023 14:08:43 +0800
Subject: [PATCH] 首件,工序检验单

---
 WebAPI/DbUntil/DataFormatUntil.cs |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/WebAPI/DbUntil/DataFormatUntil.cs b/WebAPI/DbUntil/DataFormatUntil.cs
index 5779273..381cd8d 100644
--- a/WebAPI/DbUntil/DataFormatUntil.cs
+++ b/WebAPI/DbUntil/DataFormatUntil.cs
@@ -4,6 +4,7 @@
 using System.Linq;
 using System.Reflection;
 using System.Web;
+using Newtonsoft.Json;
 
 namespace WebAPI.DbUntil
 {
@@ -64,5 +65,28 @@
             }
             return entity;
         }
+
+        #region 杩斿洖sql褰卞搷琛屾暟
+        public static int BackRowCount(string sql,string tableName)
+        {
+            return new SQLHelper.ClsCN().RunProcReturn(sql, tableName).Tables[0].Rows.Count;
+        }
+        #endregion
+
+        #region 杩斿洖sql杩斿洖鐨勬暟鎹爣棰�
+        public static List<object> BackColTitle(DataSet ds)
+        {
+            List<object> columnNameList = new List<object>();
+            foreach (DataColumn col in ds.Tables[0].Columns)
+            {
+
+                Type dataType = col.DataType;
+                string ColmString = "{\"ColmName\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                columnNameList.Add(JsonConvert.DeserializeObject(ColmString));
+            }
+            return columnNameList;
+        }
+        #endregion
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1