| | |
| | | |
| | | |
| | | |
| | | #region 发出确认单模块 调用方法 |
| | | |
| | | #region 扫描单据号条码 |
| | | |
| | | [WebMethod] |
| | | public bool set_SaveSendConfirmation_BarCode(Model.ClsKF_PonderationBillMain_Temp oMain, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); |
| | | dal.oModel = oMain; |
| | | |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_Temp_Add_SendConfirmation " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + oMain.HMaker + "','" + oMain.HBarCode + "'", "h_p_KF_PonderationBillMain_Temp_Add_SendConfirmation"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "扫描单据号条码发生错误!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 生成发出确认单 |
| | | |
| | | [WebMethod] |
| | | public bool set_SaveSendConfirmationBill_New(Int64 HInterID, string HBillNo, string HBillType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //生成出门确认单 |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_Kf_SendConfirmationBill_Insert_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "'", "h_p_Kf_SendConfirmationBill_Insert_New"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ",上传提交发出确认单,发生错误!"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "新增单据成功!"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ",生成发出确认单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 桌面条码生成外网版 |
| | | |
| | | [WebMethod] |