yangle
2025-04-08 b0688c1efd606284fd5bc31f2d60a1fec9aef968
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_SOPBillListController.cs
@@ -10,6 +10,9 @@
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Models;
using Newtonsoft.Json;
using System.Collections.Generic;
//using Excel = Microsoft.Office.Interop.Excel;
@@ -315,7 +318,7 @@
            try
            {
                ds = oCN.RunProcReturn(sWhere, "WindowPrint");
                List<object> columnNameList = new List<object>();
                //客户制定
                string sErr = "";
                if (oSystemParameter.ShowBill(ref sErr))
@@ -328,19 +331,26 @@
                    }
                  
                }
                //添加列名
                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 = "Sucess!";
                objJsonResult.Message = "[0000-1-037]Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.Message = "[0000-1-038]Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }