yxj
2024-02-28 45ed858b853dc56299fae7c435b7c4fb64b2e51a
DAL/²É¹º¹ÜÀí/ClsCg_PayableBill.cs
@@ -8,11 +8,11 @@
    public  class ClsCg_PayableBill : DBUtility.ClsXt_BaseBill
    {
        public Model.ClsCg_PayableBillMain omodel = new Model.ClsCg_PayableBillMain();
        public List<Model.ClsCg_PayableBillSub> DetailColl = new List<Model.ClsCg_PayableBillSub>();
        public List<Model.ClsCg_PayableSub> DetailColl = new List<Model.ClsCg_PayableSub>();
        public ClsCg_PayableBill()
        {
            base.MvarItemKeySub = "Cg_PayableBillSub";
            base.MvarItemKeySub = "Cg_PayableSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
@@ -55,7 +55,7 @@
                    ",HCurID = " + omodel.HCurID + "" +
                    ",HExRate = " + omodel.HExRate + "" +
                    ",HEmpID = " + omodel.HEmpID + "" +
                    ",HMangerID = " + omodel.HMangerID + "" +
                    ",HManagerID = " + omodel.HManagerID + "" +
                    ",HDeptID = " + omodel.HDeptID + "" +
                    ",HExplanation = '" + omodel.HExplanation + "'" +
                    ",HInnerBillNo = '" + omodel.HInnerBillNo + "'" +
@@ -71,7 +71,7 @@
                //插入子表
                omodel.HInterID = lngBillKey;
                //插入子表
                foreach (Model.ClsCg_PayableBillSub oSub in DetailColl)
                foreach (Model.ClsCg_PayableSub oSub in DetailColl)
                {
                    string subSql = "insert into Cg_PayableSub" +
                        "(HInterID,HEntryID,HBillNo_bak,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney" +
@@ -155,7 +155,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,HMangerID,HDeptID,HExplanation,HInnerBillNo,HRemark) " +
                    ",HMaker,HMakeDate,HSSID,HPSStyleID,HReceiveDate,HSupID,HCurID,HExRate,HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo,HRemark) " +
                    "values(" +
                    "" + omodel.HInterID + "" +
                    ",'" + omodel.HBillNo + "'" +
@@ -177,7 +177,7 @@
                    "," + omodel.HCurID + "" +
                    "," + omodel.HExRate + "" +
                    "," + omodel.HEmpID + "" +
                    "," + omodel.HMangerID + "" +
                    "," + omodel.HManagerID + "" +
                    "," + omodel.HDeptID + "" +
                    ",'" + omodel.HExplanation + "'" +
                    ",'" + omodel.HInnerBillNo + "'" +
@@ -187,7 +187,7 @@
                oCn.RunProc(mainSql);
                //插入子表
                foreach (Model.ClsCg_PayableBillSub oSub in DetailColl)
                foreach (Model.ClsCg_PayableSub oSub in DetailColl)
                {
                    string subSql = "insert into Cg_PayableSub" +
                        "(HInterID,HEntryID,HBillNo_bak,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney" +
@@ -296,7 +296,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.HMangerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMangerID"]);
                omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]);
                omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
                omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
@@ -318,7 +318,7 @@
                DetailColl.Clear();//清空
                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                {
                    Model.ClsCg_PayableBillSub oSub = new Model.ClsCg_PayableBillSub();
                    Model.ClsCg_PayableSub oSub = new Model.ClsCg_PayableSub();
                    // å›ºå®šèµ‹å€¼===============================================
                    oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
                    oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);