From 9c60b98594f1e685f4d8f99efb4e84d21b3847f3 Mon Sep 17 00:00:00 2001
From: 仲国强 <519541279@qq.com>
Date: 星期五, 15 十月 2021 11:29:55 +0800
Subject: [PATCH] 批量委外接收显示明细
---
DAL/MES/ClsSc_MESMaterToSourceBill .cs | 43 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/DAL/MES/ClsSc_MESMaterToSourceBill .cs b/DAL/MES/ClsSc_MESMaterToSourceBill .cs
index 83efea5..d13ee07 100644
--- a/DAL/MES/ClsSc_MESMaterToSourceBill .cs
+++ b/DAL/MES/ClsSc_MESMaterToSourceBill .cs
@@ -58,7 +58,7 @@
",HMainSourceBillType=" + omodel.HMainSourceBillType.ToString() +
",HMainSourceInterID=" + omodel.HMainSourceInterID.ToString() +
",HMainSourceEntryID=" + omodel.HMainSourceEntryID.ToString() +
- ",HMainSourceBillNo=" + omodel.HMainSourceBillNo.ToString() +
+ ",HMainSourceBillNo='" + omodel.HMainSourceBillNo.ToString() +"'"+
",HSourceID=" + omodel.HSourceID.ToString() +
",HProcID=" + omodel.HProcID.ToString() +
",HMaterID=" + omodel.HMaterID.ToString() +
@@ -88,7 +88,7 @@
",'" + oSub.HBarCode + "','" + oSub.HBarCode_Pack + "','" + oSub.HBillNo_bak + "'" +
") ");
}
- sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ sReturn = omodel.HInterID.ToString();
oCn.Commit();
return true;
}
@@ -265,6 +265,45 @@
}
}
+ //鍒犻櫎鍗曟嵁
+ public override bool DeleteBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ oCn.BeginTran();
+ //鍒ゆ柇鏄惁鍏佽鍒犻櫎
+ DataSet ds = oCn.RunProcReturn("exec h_p_Sc_MaterToSourceBill_DelCtrl @HInterId=" + lngBillKey + "", "h_p_Sc_MaterToSourceBill_DelCtrl");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ sReturn = "鏃犻獙璇佹暟鎹紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+
+ //鍒犻櫎鍏宠仈鍏崇郴
+ oCn.RunProc("exec h_p_Sc_MaterToSourceBill_DelRelation @HInterId=" + lngBillKey + "");
+
+ //鍒犻櫎鏄庣粏琛�
+ oCn.RunProc("Delete From " + MvarItemKeySub + " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎涓昏〃
+ oCn.RunProc("Delete From " + MvarItemKey + " where HInterID=" + lngBillKey.ToString());
+
+ sReturn = "鍒犻櫎鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
//瀹℃牳
public bool CheckBill(Int64 lngBillKey, ref string sReturn)
{
--
Gitblit v1.9.1