From a6f521ecffd706f51b068487e89476aa80041ae8 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期五, 16 六月 2023 11:28:47 +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