| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºåºç«æ±æ¥åå表æ¥è¯¢è°ç¨æ¹æ³ |
| | | /// <summary> |
| | | /// è·åæ¡ç ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetMES_StationOutBillList_PDA_QiaoYi_Json")] |
| | | [HttpGet] |
| | | public object GetMES_StationOutBillList_PDA_QiaoYi_Json(string HProcExchBillNo, string HBillNo, string HNumber, string HName, string HICMOBillNo, string user) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_MES_StationOutBillList_PDA_QiaoYi '" + HProcExchBillNo + "','" + HBillNo + "','" + HNumber + "','" + HName + "','" + HICMOBillNo + "'", "h_p_MES_StationOutBillList_PDA_QiaoYi"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½åæè¾å
¥è¿æ»¤æ¡ä»¶ï¼æ²¡æè¿åä»»ä½ç»æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºè¿ç«æ¥æ¶åå表æ¥è¯¢è°ç¨æ¹æ³ |
| | | /// <summary> |
| | | /// è·åæ¡ç ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetMES_StationInBillList_PDA_QiaoYi_Json")] |
| | | [HttpGet] |
| | | public object GetMES_StationInBillList_PDA_QiaoYi_Json(string HProcExchBillNo, string HBillNo, string HNumber, string HName, string HICMOBillNo, string user) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_MES_StationInBillList_PDA_QiaoYi '" + HProcExchBillNo + "','" + HBillNo + "','" + HNumber + "','" + HName + "','" + HICMOBillNo + "'", "h_p_MES_StationInBillList_PDA_QiaoYi"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½åæè¾å
¥è¿æ»¤æ¡ä»¶ï¼æ²¡æè¿åä»»ä½ç»æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ¥è¡¨æ°æ®è·åæ¹æ³ |
| | | |