duhe
2024-03-12 70a8152edca4eb014b429a3899de24ecc3f14f59
WebAPI/DLL/ClsSc_MESBeginWorkBill.cs
@@ -419,7 +419,7 @@
        }
        //删除单据
        public override bool DeleteBill(Int64 lngBillKey, ref string sReturn)
        public  bool DeleteBill(Int64 lngBillKey, string HBillNo, string procName, string user, ref string sReturn)
        {
            try
            {
@@ -445,6 +445,24 @@
                //删除主表
                oCn.RunProc("Delete From " + MvarItemKey + "  where HInterID=" + lngBillKey.ToString());
                //删除后控制==================================================================================
                string sql2 = "exec " + procName + " " + lngBillKey + ",'" + HBillNo + "','" + user + "'";
                ds = oCn.RunProcReturn(sql2, procName);
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    sReturn = "删除失败!原因:删除后判断失败,请与网络管理人员联系";
                    oCn.RollBack();
                    return false;
                }
                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                {
                    sReturn = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
                    oCn.RollBack();
                    return false;
                }
                //==============================================================================================
                sReturn = "删除单据成功!";
                oCn.Commit();
                return true;