| | |
| | | public string HBillNo; |
| | | public string HProductName; |
| | | public string HProductModel; |
| | | //public string RandomSearch; |
| | | } |
| | | |
| | | //白坯发布汇总报表 |
| | |
| | | [HttpGet] |
| | | public object MaterOutSumReport_Cloth(string sWhere) |
| | | { |
| | | int i = 0; |
| | | try |
| | | { |
| | | //反序列化传递的值 |
| | |
| | | ds = oCN.RunProcReturn($"exec h_p_Kf_MaterOutSumReport_Cloth '{com.HBeginDate}','{com.HEndDate}'" + |
| | | $",'{com.HMaterNumber}','{com.HBillNo}','{com.HProductName}','{com.HProductModel}'", "h_p_Kf_MaterOutSumReport_Cloth"); |
| | | |
| | | //获取列名 |
| | | 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列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | |
| | | ds = oCN.RunProcReturn($"exec h_p_Kf_MaterOutEntryReport_Cloth '{com.HBeginDate}','{com.HEndDate}'" + |
| | | $",'{com.HMaterNumber}','{com.HBillNo}','{com.HProductName}','{com.HProductModel}'", "h_p_Kf_MaterOutEntryReport_Cloth"); |
| | | |
| | | //获取列名 |
| | | 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列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |