From b82fd1f99e3a3fc5d56c1930c33a08989571f9ac Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 16 七月 2025 19:31:17 +0800
Subject: [PATCH] 修复下模单  删除报错

---
 WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
index 4a99a02..4658a51 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
@@ -1432,7 +1432,7 @@
                     BillOld.MvarItemKey = "Sc_MouldLowerBillMain";
                     //鍒犻櫎鍓嶆帶鍒�=========================================
                     DataSet ds2;
-                    string sql1 = "exec h_p_Sc_MouldLowerBill_BeforeDelCtrl " + Convert.ToInt32(HInterID) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
+                    string sql1 = "exec h_p_Sc_MouldLowerBill_BeforeDelCtrl " + Convert.ToInt32(hmainid) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
                     ds2 = oCN.RunProcReturn(sql1, "h_p_Sc_MouldLowerBill_BeforeDelCtrl");
                     if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
                     {
@@ -1461,7 +1461,7 @@
                     oCN.RunProc("delete from Sc_MouldLowerBillSub where HInterID=" + hmainid + " and HEntryID=" + hsubid);
 
                     //鍒犻櫎鍚庢帶鍒�=========================================      
-                    string sql2 = "exec h_p_Sc_MouldLowerBill_AfterDelCtrl " + Convert.ToInt32(HInterID) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
+                    string sql2 = "exec h_p_Sc_MouldLowerBill_AfterDelCtrl " + Convert.ToInt32(hmainid) + ",'" + ds.Tables[0].Rows[0]["HBillNo"] + "','" + user + "'";
                     ds2 = oCN.RunProcReturn(sql2, "h_p_Sc_MouldLowerBill_AfterDelCtrl");
                     if (ds2 == null || ds2.Tables.Count == 0 || ds2.Tables[0].Rows.Count == 0)
                     {

--
Gitblit v1.9.1