From 176c90cddfb8c43674e889d89b86cd979e94e65a Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 10 九月 2024 18:36:43 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
DAL/信息平台/ClsOA_WorkLinkBill.cs | 126 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 123 insertions(+), 3 deletions(-)
diff --git "a/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_WorkLinkBill.cs" "b/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_WorkLinkBill.cs"
index ec0f0c9..d87e527 100644
--- "a/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_WorkLinkBill.cs"
+++ "b/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_WorkLinkBill.cs"
@@ -266,9 +266,129 @@
throw (e);
}
}
-
-
-
+ //鏂板鍙坊鍔犱富琛ㄥ拰鐢ㄦ埛鍒楄〃
+ public bool AddBillNew(ref string sReturn)
+ {
+ try
+ {
+ //寰楀埌mainid
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCn.BeginTran();
+ //涓昏〃
+ oCn.RunProc("Insert Into OA_WorkLinkBillMain " +
+ "(HBillType,HInterID,HBillNo,HDate" +
+ ",HDeptID,HDescription" +
+ ",HMaker,HMakeDate,HBillStatus" +
+ ",HYear,HPeriod,HRemark,HContext" +
+ ",HSendMan,HReceiveMan,HCopyMan,HHasten" +
+ ",HLevel,HReTransmitMan,HSendType,HEvaluateStatusID" +
+ ",HCommDate,HRelationInterID,HRelationEntryID,HRelationBillNo,HRelationBillType" +
+ ") " +
+ " values('" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ "," + omodel.HDeptID.ToString() + ",'" + omodel.HDescription + "'" +
+ ",'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'," + omodel.HBillStatus +
+ "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HContext + "'" +
+ ",'" + omodel.HSendMan + "','" + omodel.HReceiveMan + "','" + omodel.HCopyMan + "'," + omodel.HHasten.ToString() + "" +
+ ",'" + omodel.HLevel + "','" + omodel.HReTransmitMan + "','" + omodel.HSendType + "'," + omodel.HEvaluateStatusID.ToString() + "" +
+ ",'" + omodel.HCommDate.ToShortDateString() + "','" + omodel.HRelationInterID + "','" + omodel.HRelationEntryID + "','" + omodel.HRelationBillNo + "','" + omodel.HRelationBillType + "'" +
+ ") ");
+ //鎻掑叆瀛愯〃
+ //foreach (ClsOA_WorkLinkBillSub oSub in DetailColl)
+ //{
+ // oCn.RunProc("Insert into OA_WorkLinkBillSub " +
+ // " (HInterID,HEntryID,HSendStatus,HSendMan" +
+ // ",HDescription,HDate)" +
+ // " values("
+ // + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HSendStatus.ToString() + ",'" + oSub.HSendMan + "'" +
+ // ",'" + oSub.HDescription + "','" + omodel.HDate.ToShortDateString() + "'" +
+ // ") ");
+ //}
+ //鎻掑叆瀛愯〃
+ foreach (ClsOA_WorkLinkBillSub2 oSub in DetailColl2)
+ {
+ oCn.RunProc("Insert into OA_WorkLinkBillSub2 " +
+ " (HInterID,HEntryID,HReceiveMan,HReadFlag)" +
+ " values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HReceiveMan + "'," + DBUtility.ClsPub.BoolToString(oSub.HReadFlag) + "" +
+ ") ");
+ }
+ //
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ //淇敼鍙富琛ㄥ拰鐢ㄦ埛鍒楄〃
+ public bool ModifyBillNew(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate OA_WorkLinkBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" +
+ ",HDeptID=" + omodel.HDeptID.ToString() +
+ ",HDate='" + omodel.HDate.ToShortDateString() + "'" +
+ ",HCommDate='" + omodel.HCommDate.ToShortDateString() + "'" +
+ ",HSendMan='" + omodel.HSendMan + "'" +
+ ",HReceiveMan='" + omodel.HReceiveMan + "'" +
+ ",HCopyMan='" + omodel.HCopyMan + "'" +
+ ",HLevel='" + omodel.HLevel + "'" +
+ ",HReTransmitMan='" + omodel.HReTransmitMan + "'" +
+ ",HContext='" + omodel.HContext + "'" +
+ ",HSendType='" + omodel.HSendType + "'" +
+ ",HDescription='" + omodel.HDescription + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpdater='" + DBUtility.ClsPub.CurUserName + "'" +
+ ",HUpdateDate='" + DBUtility.ClsPub.GetServerDate(-1) + "'" +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ //DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub2(lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ //鎻掑叆瀛愯〃
+ //foreach (ClsOA_WorkLinkBillSub oSub in DetailColl)
+ //{
+ // oCn.RunProc("Insert into OA_WorkLinkBillSub " +
+ // " (HInterID,HEntryID,HSendStatus,HSendMan" +
+ // ",HDescription,HDate)" +
+ // " values("
+ // + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HSendStatus.ToString() + ",'" + oSub.HSendMan + "'" +
+ // ",'" + oSub.HDescription + "','" + omodel.HDate.ToShortDateString() + "'" +
+ // ") ");
+ //}
+ //鎻掑叆瀛愯〃
+ foreach (ClsOA_WorkLinkBillSub2 oSub in DetailColl2)
+ {
+ oCn.RunProc("Insert into OA_WorkLinkBillSub2 " +
+ " (HInterID,HEntryID,HReceiveMan,HReadFlag)" +
+ " values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HReceiveMan + "'," + DBUtility.ClsPub.BoolToString(oSub.HReadFlag) + "" +
+ ") ");
+ }
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
}
}
--
Gitblit v1.9.1