From 51c8ecb7a3e5c8d681c7498c7a2e5ee1f108b90d Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 26 四月 2024 13:41:57 +0800
Subject: [PATCH] 1

---
 DAL/采购管理/ClsCg_PayableBill.cs |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git "a/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs" "b/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
index d92218b..00285c8 100644
--- "a/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
+++ "b/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
@@ -32,10 +32,35 @@
         #endregion
         #endregion
 
+        //鍒犻櫎鍏宠仈
+        public override void DeleteRelation(ref string sReturn, Int64 lngBillKey)
+        {
+            //閲囪喘鍏ュ簱鍗� 閲囪喘璁㈠崟 鍏宠仈鏁伴噺
+            try
+            {
+                if (DetailColl[0].HSourceBillType == "1201")                      //閲囪喘鍏ュ簱鍗�
+                {
+                    oCn.RunProc("exec h_p_Cg_UpDateRelation_POStockInToPayable_Del " + lngBillKey.ToString());
+                }
+                else if (DetailColl[0].HSourceBillType == "1102")                    //閲囪喘璁㈠崟
+                {
+                    oCn.RunProc("exec h_p_Cg_UpDateRelation_POOrderToPayable_Del " + lngBillKey.ToString());
+                }
+                else
+                {
+
+                }
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+
         //鏂板鍏宠仈
         public override void AddNewRelation(ref string sReturn, Int64 lngBillKey)
         {
-            //鏀舵枡閫氱煡鍗� 閫�鏂欓�氱煡鍗� 鍏宠仈鏁伴噺
+            //閲囪喘鍏ュ簱鍗� 閲囪喘璁㈠崟 鍏宠仈鏁伴噺
             try
             {
                 if (DetailColl[0].HSourceBillType == "1201")                      //閲囪喘鍏ュ簱鍗�
@@ -94,7 +119,7 @@
                     ",HCurID = " + omodel.HCurID + "" +
                     ",HExRate = " + omodel.HExRate + "" +
                     ",HEmpID = " + omodel.HEmpID + "" +
-                    ",HManagerID = " + omodel.HManagerID + "" +
+                    ",HMangerID = " + omodel.HMangerID + "" +
                     ",HDeptID = " + omodel.HDeptID + "" +
                     ",HExplanation = '" + omodel.HExplanation + "'" +
                     ",HInnerBillNo = '" + omodel.HInnerBillNo + "'" +
@@ -225,7 +250,7 @@
                 string mainSql = "insert into Cg_PayableBillMain" +
                     "(HInterID,HBillNo,HDate,HYear,HPeriod,HBillType,HBillSubType" +
                     ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
-                    ",HMaker,HMakeDate,HSSID,HPSStyleID,HReceiveDate,HSupID,HCurID,HExRate,HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo,HRemark) " +
+                    ",HMaker,HMakeDate,HSSID,HPSStyleID,HReceiveDate,HSupID,HCurID,HExRate,HEmpID,HMangerID,HDeptID,HExplanation,HInnerBillNo,HRemark) " +
                     "values(" +
                     "" + omodel.HInterID + "" +
                     ",'" + omodel.HBillNo + "'" +
@@ -247,7 +272,7 @@
                     "," + omodel.HCurID + "" +
                     "," + omodel.HExRate + "" +
                     "," + omodel.HEmpID + "" +
-                    "," + omodel.HManagerID + "" +
+                    "," + omodel.HMangerID + "" +
                     "," + omodel.HDeptID + "" +
                     ",'" + omodel.HExplanation + "'" +
                     ",'" + omodel.HInnerBillNo + "'" +
@@ -383,7 +408,7 @@
                 omodel.HCurID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCurID"]);
                 omodel.HExRate = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HExRate"]);
                 omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
-                omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]);
+                omodel.HMangerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMangerID"]);
                 omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
 
                 omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);

--
Gitblit v1.9.1