| | |
| | | using System.Linq; |
| | | using System.Reflection; |
| | | using System.Web; |
| | | using Newtonsoft.Json; |
| | | |
| | | namespace WebAPI.DbUntil |
| | | { |
| | |
| | | } |
| | | 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 |
| | | |
| | | } |
| | | } |