From 4d2d5f8d8151e6b74811bc1dbd9cbfd74d7498f1 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 25 九月 2023 15:36:24 +0800
Subject: [PATCH] 1
---
DAL/生产管理/模具管理/ClsSc_MouldMaintainPlanBill.cs | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 44 insertions(+), 5 deletions(-)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
index f81c082..b8529c8 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
@@ -9,6 +9,7 @@
{
public Model.ClsSc_MouldMaintainPlanBillMain omodel = new Model.ClsSc_MouldMaintainPlanBillMain();
public List<Model.ClsSc_MouldMaintainPlanBillSub> DetailColl = new List<Model.ClsSc_MouldMaintainPlanBillSub>();
+ public List<Model.ClsSc_MouldMaintainPlanBillSub_Item> DetailCol = new List<Model.ClsSc_MouldMaintainPlanBillSub_Item>();
public ClsSc_MouldMaintainPlanBill()
{
@@ -56,7 +57,7 @@
//",HGroupID=" + omodel.HGroupID.ToString() +
//",HWHID=" + omodel.HWHID.ToString() +
//",HSCWHID=" + omodel.HSCWHID.ToString() +
-
+ ",HMouldMaintainRuleID='" + omodel.HMouldMaintainRuleID + "'" +
",HCycleUnit='" + omodel.HCycleUnit + "'" +
",HCheckCycle=" + omodel.HCheckCycle.ToString() +
",HBeginDate='" + omodel.HBeginDate + "'" +
@@ -69,8 +70,10 @@
DeleteRelation(ref sReturn, lngBillKey);
//鍒犻櫎瀛愯〃
DeleteBillSub(lngBillKey);
- //鎻掑叆瀛愯〃
+ oCn.RunProc("delete from Sc_MouldMaintainPlanBillSub_Item where HInterID=" + lngBillKey);
+
omodel.HInterID = lngBillKey;
+ //鎻掑叆瀛愯〃閰嶄欢淇℃伅
foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub " +
@@ -84,6 +87,24 @@
",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
"," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
") ");
+ }
+
+ //鎻掑叆淇濆吇椤瑰瓙琛�
+ foreach (Model.ClsSc_MouldMaintainPlanBillSub_Item Item in DetailCol)
+ {
+ oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Item" +
+ " (HInterID,HEntryID,HMaintainItemID" +
+ ",HMaintainPart,HClaim" +
+ ",HManagerID" +
+ ",HCloseMan,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainItem" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.ToString() +
+ ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" +
+ "," + Item.HManagerID.ToString() +
+ ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" +
+ "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() + ",'" + Item.HMaintainItem.ToString() +
+ "') ");
}
//
//foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
@@ -122,14 +143,14 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark" +
",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+
- ",HInnerBillNo,HExplanation" +
+ ",HInnerBillNo,HExplanation,HMouldMaintainRuleID" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "'" +
- ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" +
+ ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "','" + omodel.HMouldMaintainRuleID + "'" +
") ");
- //鎻掑叆瀛愯〃
+ //鎻掑叆瀛愯〃閰嶄欢淇℃伅
foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub " +
@@ -144,6 +165,24 @@
"," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
") ");
}
+
+ //鎻掑叆淇濆吇椤瑰瓙琛�
+ foreach (Model.ClsSc_MouldMaintainPlanBillSub_Item Item in DetailCol)
+ {
+ oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Item" +
+ " (HInterID,HEntryID,HMaintainItemID" +
+ ",HMaintainPart,HClaim" +
+ ",HManagerID" +
+ ",HCloseMan,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainItem" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + Item.HEntryID.ToString() + "," + Item.HMaintainItemID.ToString() +
+ ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" +
+ "," + Item.HManagerID.ToString() +
+ ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" +
+ "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() +"," + Item.HMaintainItem.ToString() +
+ ") ");
+ }
//
//foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
//{
--
Gitblit v1.9.1