ch
2022-09-21 a51499eacba7bd26d3240d5c388efd4201ec9777
WebAPI/Controllers/¹¤×ʹÜÀí/Gy_GroupEmpBillController.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
@@ -32,6 +33,7 @@
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (!DBUtility.ClsPub.Security_Log("Gy_Group", 1, false, user))
                {
                    objJsonResult.code = "0";
@@ -43,10 +45,19 @@
                ds = Sc_GetGroupEmpBill(sWhere);
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "返回记录成功!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception ex)