| | |
| | | } |
| | | #endregion |
| | | |
| | | #region [éè¿æ¡ç ç¼å·è·åHItemId] |
| | | [Route("Sc_BarCode/Get_HItemId")] |
| | | [HttpGet] |
| | | public object Get_HItemId(string sWhere) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList where æ¡ç ç¼å· = '" + sWhere + "'", "h_v_IF_BarCodeBillList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | 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.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [éè¿éæ©çæºåä¿¡æ¯æ¥æ¾æºåæ°æ®] |
| | | [Route("Sc_BarCode/SelectReportFromBillList")] |
| | | [HttpPost] |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region [åæ¥èµæ] |
| | | [Route("Sc_BarCode/Sync_data")] |
| | | [HttpGet] |
| | | public object Sync_data() |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.RunProc("exec h_p_IF_ERPDataToLocal", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "忥åºç¡èµææåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "忥åºç¡èµæå¤±è´¥ï¼" + e; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ¹æ¬¡] |
| | | [Route("Sc_BarCode/Batch")] |
| | | [HttpGet] |
| | | public object Batch(int HMaterID, string HBatchNo) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | bool b = false; |
| | | if (HMaterID != 0) |
| | | { |
| | | DataSet oDs = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_GetBatchNo " + HMaterID.ToString() + ",'" + HBatchNo + "','" + "" + "','" + "" + "'", "h_p_Gy_BarCodeBill_GetBatchNo"); |
| | | // |
| | | if (oDs == null && oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message="çææ¹æ¬¡å¤±è´¥ï¼"; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message = "çææ¹æ¬¡æåï¼"; |
| | | objJsonResult.data = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | b = true; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //æç»è¡¨æ¯å¦ä¸ºé¶è¡ |
| | | if (b == false) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message="没æéè¦çææ¹æ¬¡çæç»è¡ï¼"; |
| | | return objJsonResult; |
| | | } |
| | | else //å®å
¨å°é |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ¡ç çææ¥å£] |
| | | [Route("Sc_BarCode/Sub_SaveBill")] |
| | | [HttpPost] |
| | |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region[忮宿´æ§å¤æ] |
| | | private bool Sub_AllowSave(string msg2, string HSelectBarCodeType) |