1
yangle
2024-12-18 5e10a686a1d0dbf67f9422844cf857dc5c68a656
DAL/Ó¦¸¶¹ÜÀí/ClsYF_PayMentOtherBill.cs
@@ -49,7 +49,7 @@
                ",HUpDateDate=getdate()" +
                //========================================
                ",HAccDate='" + omodel.HAccDate.ToShortDateString() + "'" +
                ",HCusID=" + omodel.HCusID.ToString() +
                ",HSupID=" + omodel.HSupID.ToString() +
                ",HCurID=" + omodel.HCurID.ToString() +
                ",HExRate=" + omodel.HExRate.ToString() +
                ",HDeptID=" + omodel.HDeptID.ToString() +
@@ -66,7 +66,31 @@
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
                foreach (Model.ClsYF_PayMentOtherBillSub oSub in DetailColl)
                {
                    string subSql = "insert into YF_PayMentOtherBillSub" +
                         "" +
                         "" +
                         "" +
                         "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                         ",HProjectMoneyID,HTypeSub,HMoney,HTaxRate,HSumMoney,HRemark) " +
                         " values(" +
                         "" + omodel.HInterID.ToString() +
                         "," + oSub.HEntryID.ToString() +
                         "," + oSub.HSourceInterID +
                         "," + oSub.HSourceEntryID +
                         ",'" + oSub.HSourceBillNo +
                         "','" + oSub.HSourceBillType +
                         "','" + oSub.HProjectMoneyID +
                         "','" + oSub.HTypeSub +
                         "','" + oSub.HMoney +
                         "','" + oSub.HTaxRate +
                         "','" + oSub.HSumMoney +
                         "','" + oSub.HRemark +
                         "')";
                    oCn.RunProc(subSql);
                }
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -91,15 +115,39 @@
                oCn.RunProc("Insert Into YF_PayMentOtherBillMain   " +
               "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
               ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
               ",HAccDate,HCusID,HCurID,HExRate" +
               ",HAccDate,HSupID,HCurID,HExRate" +
               ",HDeptID,HEmpID,HProjectMoneyID,HType,HMoney,HTaxRate,HSumMoney,HExplanation,HInnerBillNo,HOrgID" +
               ") " +
               " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
               ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
               ",'" + omodel.HAccDate.ToShortDateString() + "'," + omodel.HCusID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() +
               ",'" + omodel.HAccDate.ToShortDateString() + "'," + omodel.HSupID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() +
               ", '" + omodel.HDeptID.ToString() + "','" + omodel.HEmpID.ToString() + "','" + omodel.HProjectMoneyID.ToString() + "','" + omodel.HType + "','" + omodel.HMoney + "','" + omodel.HTaxRate + "','" + omodel.HSumMoney + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HOrgID + "'" +
               ") ");
                //插入子表
                foreach (Model.ClsYF_PayMentOtherBillSub oSub in DetailColl)
                {
                    string subSql = "insert into YF_PayMentOtherBillSub" +
                         "" +
                         "" +
                         "" +
                         "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                         ",HProjectMoneyID,HTypeSub,HMoney,HTaxRate,HSumMoney,HRemark) " +
                         " values(" +
                         "" + omodel.HInterID.ToString() +
                         "," + oSub.HEntryID.ToString() +
                         "," + oSub.HSourceInterID +
                         "," + oSub.HSourceEntryID +
                         ",'" + oSub.HSourceBillNo +
                         "','" + oSub.HSourceBillType +
                         "','" + oSub.HProjectMoneyID +
                         "','" + oSub.HTypeSub +
                         "','" + oSub.HMoney +
                         "','" + oSub.HTaxRate +
                         "','" + oSub.HSumMoney +
                         "','" + oSub.HRemark +
                         "')";
                    oCn.RunProc(subSql);
                }
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
@@ -152,7 +200,7 @@
                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
                //========================================================
                omodel.HAccDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HAccDate"]);
                omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"]);
                omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);
                omodel.HCurID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCurID"]);
                omodel.HExRate = DBUtility.ClsPub.isSingle(Ds.Tables[0].Rows[0]["HExRate"]);
                omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);