| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | |
| | | Int64 RowTotal = Common.GetRowTotal("h_v_SRM_BarCodeBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //获取返回数据 |
| | | ds = oCn.RunProcReturn("exec h_p_SRM_BarCodeBillList '" + PcWhere + "'", "h_v_SRM_BarCodeBillList"); |
| | | //添加列名 |
| | | List<object> columnNameList = new List<object>(); |
| | | 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列对象的列名 |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "获取成功"; |
| | | objjson.list = columnNameList; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |