From 69d1e112acf87dc96c4beb55c9a8abd1286fa287 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期一, 06 五月 2024 17:15:24 +0800
Subject: [PATCH] 1. 必录项 标识加上 2.工作任务 增加 任务类别 的 字段 以及 选择基础资料功能; 3.工程项目中 项目列表 选择现在会 报错;完善;
---
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