yxj
2022-03-14 8392e7a4686794df6eeeb9f68fbdf11ba3580450
新增发出确认单模块调用方法
1个文件已修改
78 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -27447,6 +27447,84 @@
        #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]