From 1bcafef1e321654d5220957e4d3bf38cb7369a6a Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 28 二月 2024 11:25:57 +0800
Subject: [PATCH] 销售订单:主表增加 定金比例 字段
---
DAL/ClsPM_WorkPlanMonthBillMain.cs | 129 ++++++++++++++++++++----------------------
1 files changed, 62 insertions(+), 67 deletions(-)
diff --git a/DAL/ClsPM_WorkPlanMonthBillMain.cs b/DAL/ClsPM_WorkPlanMonthBillMain.cs
index bfdfee9..a853518 100644
--- a/DAL/ClsPM_WorkPlanMonthBillMain.cs
+++ b/DAL/ClsPM_WorkPlanMonthBillMain.cs
@@ -33,75 +33,70 @@
#endregion
//#region 淇敼鍗曟嵁
- //public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
- //{
- // try
- // {
- // oCn.BeginTran();
- // //鏇存柊涓昏〃
- // string mainSql = "update PM_WorkPlanMonthBillMain set " +
- // " HBillNo = '" + omodel.HBillNo +
- // "', HDate = '" + omodel.HDate +
- // "', HYear = " + omodel.HYear +
- // ", HPeriod = " + omodel.HPeriod +
- // ", HRemark = '" + omodel.HRemark +
- // "', HUpDater = '" + omodel.HUpDater +
- // "', HUpDateDate = getdate()" +
- // //===============================================================
- // ", HOrgID = " + omodel.HOrgID +
- // ", HYear = " + omodel.HYear +
- // ", HWeek = " + omodel.HWeek +
- // ", HBeginDate = '" + omodel.HBeginDate +
- // "', HEndDate = '" + omodel.HEndDate +
- // "', HPlanEmpID = " + omodel.HReportEmpID +
- // " where HInterID = " + omodel.HInterID;
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ string mainSql = "update PM_WorkPlanMonthBillMain set " +
+ " HBillNo = '" + omodel.HBillNo +
+ "', HDate = '" + omodel.HDate +
+ "', HYear = " + omodel.HYear +
+ ", HMonth = " + omodel.HMonth +
+ ", HRemark = '" + omodel.HRemark +
+ "', HUpDater = '" + omodel.HUpDater +
+ "', HUpDateDate = getdate()" +
+ //===============================================================
+
+
+ ", HBeginDate = '" + omodel.HBeginDate +
+ "', HEndDate = '" + omodel.HEndDate +
+ "', HPlanEmpID = " + omodel.HPlanEmpID +
+ " where HInterID = " + omodel.HInterID;
- // //鍒犻櫎鍏宠仈
- // DeleteRelation(ref sReturn, lngBillKey);
- // //鍒犻櫎瀛愯〃
- // DeleteBillSub(lngBillKey);
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub(lngBillKey);
- // ////鎻掑叆瀛愯〃
- // //omodel.HInterID = lngBillKey;
- // //foreach (Model.ClsPM_WorkTaskWeekBillSub oSub in DetailColl)
- // //{
- // // string subSql = "insert into PM_WorkTaskWeekBillSub" +
- // // "(HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- // // ",HWeekDay,HSno,HProjectID,HProjectStageID,HTaskNote,HPlanTimes) " +
- // // " values(" +
- // // "" + omodel.HInterID.ToString() +
- // // "," + oSub.HEntryID.ToString() +
- // // ",'" + oSub.HCloseMan +
- // // "','" + oSub.HEntryCloseDate +
- // // "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) +
- // // ",'" + oSub.HRemark +
- // // "'," + oSub.HSourceInterID +
- // // "," + oSub.HSourceEntryID +
- // // ",'" + oSub.HSourceBillNo +
- // // "','" + oSub.HSourceBillType +
- // // "'," + oSub.HRelationQty +
- // // "," + oSub.HRelationMoney +
- // // "," + oSub.HWeekDay +
- // // "," + oSub.HSno +
- // // "," + oSub.HProjectID +
- // // "," + oSub.HProjectStageID +
- // // ",'" + oSub.HTaskNote +
- // // "'," + oSub.HPlanTimes +
- // // ")";
- // // oCn.RunProc(subSql);
- // //}
-
- // sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
- // oCn.Commit();
- // return true;
- // }
- // catch (Exception e)
- // {
- // sReturn = e.Message;
- // oCn.RollBack();
- // throw (e);
- // }
- //}
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Model.ClsPM_WorkPlanMonthBillSub oSub in DetailColl)
+ {
+ string subSql = "insert into PM_WorkPlanMonthBillSub" +
+ "" +
+ "" +
+ "" +
+ "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HProNumber,HProjectStageID,HRate,HAvgMoney,HCountMoney) " +
+ " values(" +
+ "" + omodel.HInterID.ToString() +
+ "," + oSub.HEntryID.ToString() +
+ "," + oSub.HSourceInterID +
+ "," + oSub.HSourceEntryID +
+ ",'" + oSub.HSourceBillNo +
+ "','" + oSub.HSourceBillType +
+ "','" + oSub.HProNumber +
+ "'," + oSub.HProjectStageID +
+ "," + oSub.HRate +
+ ",'" + oSub.HAvgMoney +
+ "','" + oSub.HCountMoney +
+ "')";
+ oCn.RunProc(subSql);
+ }
+
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
//#endregion
#region 鏂板鍗曟嵁
--
Gitblit v1.9.1