| | |
| | | { |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | DataSet ds; |
| | | |
| | | #region é½å¥åæä¿¡æ¯æç»å表 |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region é½å¥ç©æä¿¡æ¯æç»å表 |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="sWhere">æ¥è¯¢æ¡ä»¶</param> |
| | | /// <param name="HMainICMOEntryID">ç产订åæç»è¡¨id</param> |
| | | /// <returns></returns> |
| | | [Route("JIT_Complete/JIT_CompleteMaterlDetailList")] |
| | | [HttpGet] |
| | | public object JIT_CompleteMaterlDetailList(string sWhere ) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_JIT_MaterDetailList " + sWhere, "h_p_JIT_MaterDetailList"); |
| | | |
| | | |
| | | 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.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_STK_Inventory where 1=1 " + sWhere + "", "h_v_STK_Inventory"); |
| | | |
| | | string Ret = ""; |
| | | oSystemParameter.ShowBill(ref Ret); |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å¯è´å¥ç¹") |
| | | { |
| | | ds = oCN.RunProcReturn("select top 1000 * from h_v_STK_Inventory where 1=1 " + sWhere + "", "h_v_STK_Inventory"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_STK_Inventory where 1=1 " + sWhere + "", "h_v_STK_Inventory"); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |