| | |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_FuHeFenXiReport")] |
| | | [HttpGet] |
| | | public object JIT_FuHeFenXiReport(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | string sql = "exec h_p_JIT_FuHeFenXiReport '" + sWhere + "','" + user + "'"; |
| | | //[Route("JIT_DayPlanPlatFormBill/JIT_FuHeFenXiReport")] |
| | | //[HttpGet] |
| | | //public object JIT_FuHeFenXiReport(string sWhere, string user) |
| | | //{ |
| | | // try |
| | | // { |
| | | // List<object> columnNameList = new List<object>(); |
| | | // string sql = "exec h_p_JIT_FuHeFenXiReport '" + sWhere + "','" + user + "'"; |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_p_JIT_FuHeFenXiReport"); |
| | | // ds = oCN.RunProcReturn(sql, "h_p_JIT_FuHeFenXiReport"); |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | // //æ·»å åå |
| | | // 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.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | // objJsonResult.code = "1"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "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.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | #endregion |
| | | |
| | | } |