From c6830a3ee2e41efe330f5e3458581f14b1767b7f Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期二, 20 六月 2023 08:54:44 +0800 Subject: [PATCH] 网页目录菜单加载 --- WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 106 insertions(+), 2 deletions(-) diff --git a/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs b/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs index 8d0e535..b02339f 100644 --- a/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs +++ b/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs @@ -12,7 +12,7 @@ public ClsSb_EquipDotCheckRuleBill() { - base.MvarItemKeySub = "ClsSb_EquipDotCheckRuleBillSub"; + base.MvarItemKeySub = "Sb_EquipDotCheckRuleBillSub"; base.MvarItemKeySub2 = ""; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; @@ -20,6 +20,110 @@ base.MvarReportTitle = "璁惧鐐规瑙勭▼"; base.BillType = "3913"; } - + //淇敼鍗曟嵁 + public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) + { + try + { + // + oCn.BeginTran(); + //鏇存柊涓昏〃 + oCn.RunProc("UpDate Sb_EquipDotCheckRuleBillMain set " + + " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��=============== + ",HDate='" + omodel.HDate + "'" + + ",HYear='" + omodel.HYear.ToString() + "'" + + ",HPeriod='" + omodel.HPeriod.ToString() + "'" + + ",HRemark='" + omodel.HRemark + "'" + + ",HUpDater='" + omodel.HMaker + "'" + + ",HUpDateDate=getdate()" + + //======================================== + ",HBeginDate='" + omodel.HBeginDate + "'" + + ",HEndDate='" + omodel.HEndDate + "'" + + ",HCycleUnit='" + omodel.HCycleUnit+ "'" + + ",HCheckCycle='" + omodel.HCheckCycle + "'" + + ",HExplanation='" + omodel.HExplanation + "'" + + ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + + " where HInterID=" + lngBillKey.ToString()); + //鍒犻櫎鍏宠仈 + DeleteRelation(ref sReturn, lngBillKey); + //鍒犻櫎瀛愯〃 + oCn.RunProc("Delete From Sb_EquipDotCheckRuleBillSub where HInterID=" + lngBillKey.ToString()); + //鎻掑叆瀛愯〃 + omodel.HInterID = lngBillKey; + foreach (Models.ClsSb_EquipDotCheckRuleBillSub oSub in DetailColl_Mater) + { + oCn.RunProc("Insert into Sb_EquipDotCheckRuleBillSub " + + " (HInterID,HEntryID," + + "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + + "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + + "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," + + "HManagerID" + + ") values(" + + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + + ",'" + oSub.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + + "'," + oSub.HManagerID.ToString() + + ") "); + } + sReturn = "淇敼鍗曟嵁鎴愬姛锛�"; + oCn.Commit(); + return true; + } + catch (Exception e) + { + sReturn = e.Message; + oCn.RollBack(); + throw (e); + } + } + //鏂板鍗曟嵁 + public override bool AddBill(ref string sReturn) + { + try + { + //寰楀埌mainid + omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); + //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� + oCn.BeginTran(); + //涓昏〃 + oCn.RunProc("Insert Into Sb_EquipDotCheckRuleBillMain " + + "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + + ",HYear,HPeriod,HRemark" + + ",HBeginDate,HEndDate,HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo" + + ") " + + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + + "'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HCycleUnit+ "','" + omodel.HCheckCycle + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + + ") "); + //鎻掑叆瀛愯〃 + foreach (Models.ClsSb_EquipDotCheckRuleBillSub oSub in DetailColl_Mater) + { + oCn.RunProc("Insert into Sb_EquipDotCheckRuleBillSub " + + " (HInterID,HEntryID," + + "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + + "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + + "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," + + "HManagerID" + + ") values(" + + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + + ",'" + oSub.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + + "'," + oSub.HManagerID.ToString() + + ") "); + } + sReturn = "鏂板鍗曟嵁鎴愬姛锛�"; + oCn.Commit(); + return true; + } + catch (Exception e) + { + sReturn = e.Message; + oCn.RollBack(); + throw (e); + } + } + //鏄剧ず鍗曟嵁 } } \ No newline at end of file -- Gitblit v1.9.1