| | |
| | | |
| | | #endregion |
| | | |
| | | #region å¨å
·ç¼åå表模åè°ç¨æ¹æ³ |
| | | |
| | | #region å¨å
·ç¼åå表çé¢ï¼è¿åç¼ååè¡¨ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// å¨å
·ç¼åå表çé¢ï¼è¿åç¼ååè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MouldController/GetKf_PonderationBillMain_TempList_New_Json")] |
| | | [HttpGet] |
| | | public object GetKf_PonderationBillMain_TempList_New_Json(string HBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_GetMouldStockBillMain_TempList '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_GetMouldStockBillMain_TempList"); |
| | | 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("MouldController/MouldTempList_Modify_Json")] |
| | | [HttpGet] |
| | | public object MouldTempList_Modify_Json(long HInterID, string HBillNo, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_MouldTempList_Modify " + HInterID + ",'" + HBillNo + "','" + HBillType + "'", "h_p_WMS_MouldTempList_Modify"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "模å
·ç¼åå表ç¼è¾åå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = null; |
| | | 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("MouldController/set_DeleteMouldBillList_Json")] |
| | | [HttpGet] |
| | | public object set_DeleteMouldBillList_Json(long HInterID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¨å
·ç¼ååè¡¨åæ®å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region å¨å
·æäº¤çåå¤çæ¹æ³ |
| | | |
| | |
| | | BillNew.omodel.HDate = mainList[0].HDate; |
| | | BillNew.omodel.HRemark = mainList[0].HRemark; |
| | | BillNew.omodel.HMaker = mainList[0].HMaker; |
| | | BillNew.omodel.HSTOCKORGID = mainList[0].HSTOCKORGID; |
| | | BillNew.omodel.HSTOCKORGID = mainList[0].HStockInOrgID; |
| | | DBUtility.ClsPub.CurUserName = mainList[0].HMaker; |
| | | //==================================================== |
| | | BillNew.omodel.HSupID = mainList[0].HSupID; |