1
yusijie
2024-08-26 44022bb67f0274c444dce7bc558e7a16df93b402
DAL/Ó¦¸¶¹ÜÀí/ClsYF_PayMentBill.cs
@@ -31,8 +31,48 @@
        {
            DetailColl = null;
        }
        #endregion   è‡ªå®šä¹‰æ–¹æ³•
        //删除关联
        public override void DeleteRelation(ref string sReturn, Int64 lngBillKey)
        {
            //应收单 å…³è”数量
            try
            {
                if (DetailColl[0].HSourceBillType == "1114")                    //应付单
                {
                    oCn.RunProc("exec h_p_Cg_UpDateRelation_PayableToPayMent_Del " + lngBillKey.ToString());
                }
                else
                {
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //新增关联
        public override void AddNewRelation(ref string sReturn, Int64 lngBillKey)
        {
            //应收单 å…³è”数量
            try
            {
                if (DetailColl[0].HSourceBillType == "1114")                    //应付单
                {
                    oCn.RunProc("exec h_p_Cg_UpDateRelation_PayableToPayMent_Add " + lngBillKey.ToString());
                }
                else
                {
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
@@ -82,8 +122,11 @@
                ",HMainSourceBillNo='" + omodel.HMainSourceBillNo.ToString() +
                "',HMainSourceBillType='" + omodel.HMainSourceBillType.ToString() +
                "' where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                if (DetailColl.Count != 0)
                {
                    //删除关联
                    DeleteRelation(ref sReturn, lngBillKey);
                }
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
@@ -120,6 +163,11 @@
                //        return false;
                //    }
                //}
                if (DetailColl.Count != 0)
                {
                    //更新订单关联数量
                    AddNewRelation(ref sReturn, omodel.HInterID);
                }
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -178,6 +226,11 @@
                      "," + oSub.HPOContractInterID.ToString() + "," + oSub.HPOContractEntryID.ToString() + ",'" + oSub.HPOContractBillNo + "'," + oSub.HSeContractInterID.ToString() + "," + oSub.HSeContractEntryID.ToString() + ",'" + oSub.HSeContractBillNo + "'" +
                      ") ");
                }
                if (DetailColl.Count != 0)
                {
                    //更新订单关联数量
                    AddNewRelation(ref sReturn, omodel.HInterID);
                }
                //
                //foreach (Model.ClsYF_PayMentBillSub oSub in DetailColl)
                //{