From 4901a4f838dbfa56be1843e36817304ec9feb8d2 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 07 十一月 2024 10:06:07 +0800
Subject: [PATCH] 工艺路线:新增时,若公司为乔一,则判断是否设置为默认工序,设置则调用存储过程将该物料其它工艺路线的默认标记取消
---
DAL/应付管理/ClsYF_PayMentOtherBill.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 54 insertions(+), 6 deletions(-)
diff --git "a/DAL/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentOtherBill.cs" "b/DAL/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentOtherBill.cs"
index da6fabd..f64f07a 100644
--- "a/DAL/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentOtherBill.cs"
+++ "b/DAL/\345\272\224\344\273\230\347\256\241\347\220\206/ClsYF_PayMentOtherBill.cs"
@@ -49,7 +49,7 @@
",HUpDateDate=getdate()" +
//========================================
",HAccDate='" + omodel.HAccDate.ToShortDateString() + "'" +
- ",HCusID=" + omodel.HCusID.ToString() +
+ ",HSupID=" + omodel.HSupID.ToString() +
",HCurID=" + omodel.HCurID.ToString() +
",HExRate=" + omodel.HExRate.ToString() +
",HDeptID=" + omodel.HDeptID.ToString() +
@@ -66,7 +66,31 @@
DeleteRelation(ref sReturn, lngBillKey);
//鍒犻櫎瀛愯〃
DeleteBillSub(lngBillKey);
-
+ //鎻掑叆瀛愯〃
+ foreach (Model.ClsYF_PayMentOtherBillSub oSub in DetailColl)
+ {
+ string subSql = "insert into YF_PayMentOtherBillSub" +
+ "" +
+ "" +
+ "" +
+ "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HProjectMoneyID,HTypeSub,HMoney,HTaxRate,HSumMoney,HRemark) " +
+ " values(" +
+ "" + omodel.HInterID.ToString() +
+ "," + oSub.HEntryID.ToString() +
+ "," + oSub.HSourceInterID +
+ "," + oSub.HSourceEntryID +
+ ",'" + oSub.HSourceBillNo +
+ "','" + oSub.HSourceBillType +
+ "','" + oSub.HProjectMoneyID +
+ "','" + oSub.HTypeSub +
+ "','" + oSub.HMoney +
+ "','" + oSub.HTaxRate +
+ "','" + oSub.HSumMoney +
+ "','" + oSub.HRemark +
+ "')";
+ oCn.RunProc(subSql);
+ }
sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
@@ -91,15 +115,39 @@
oCn.RunProc("Insert Into YF_PayMentOtherBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
- ",HAccDate,HCusID,HCurID,HExRate" +
+ ",HAccDate,HSupID,HCurID,HExRate" +
",HDeptID,HEmpID,HProjectMoneyID,HType,HMoney,HTaxRate,HSumMoney,HExplanation,HInnerBillNo,HOrgID" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
- ",'" + omodel.HAccDate.ToShortDateString() + "'," + omodel.HCusID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() +
+ ",'" + omodel.HAccDate.ToShortDateString() + "'," + omodel.HSupID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() +
", '" + omodel.HDeptID.ToString() + "','" + omodel.HEmpID.ToString() + "','" + omodel.HProjectMoneyID.ToString() + "','" + omodel.HType + "','" + omodel.HMoney + "','" + omodel.HTaxRate + "','" + omodel.HSumMoney + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HOrgID + "'" +
") ");
-
+ //鎻掑叆瀛愯〃
+ foreach (Model.ClsYF_PayMentOtherBillSub oSub in DetailColl)
+ {
+ string subSql = "insert into YF_PayMentOtherBillSub" +
+ "" +
+ "" +
+ "" +
+ "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HProjectMoneyID,HTypeSub,HMoney,HTaxRate,HSumMoney,HRemark) " +
+ " values(" +
+ "" + omodel.HInterID.ToString() +
+ "," + oSub.HEntryID.ToString() +
+ "," + oSub.HSourceInterID +
+ "," + oSub.HSourceEntryID +
+ ",'" + oSub.HSourceBillNo +
+ "','" + oSub.HSourceBillType +
+ "','" + oSub.HProjectMoneyID +
+ "','" + oSub.HTypeSub +
+ "','" + oSub.HMoney +
+ "','" + oSub.HTaxRate +
+ "','" + oSub.HSumMoney +
+ "','" + oSub.HRemark +
+ "')";
+ oCn.RunProc(subSql);
+ }
sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
@@ -152,7 +200,7 @@
omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
//========================================================
omodel.HAccDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HAccDate"]);
- omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"]);
+ omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);
omodel.HCurID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCurID"]);
omodel.HExRate = DBUtility.ClsPub.isSingle(Ds.Tables[0].Rows[0]["HExRate"]);
omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
--
Gitblit v1.9.1