zrg
2024-03-11 7ff36a7bef22bade6d8a91dd6755f09556bf925b
DAL/Ó¦ÊÕ¹ÜÀí/ClsYS_ReceiveOtherBill.cs
@@ -66,7 +66,31 @@
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
                omodel.HInterID = lngBillKey;
                foreach (Model.ClsYS_ReceiveOtherBillSub oSub in DetailColl)
                {
                    string subSql = "insert into YS_ReceiveOtherBillSub" +
                         "" +
                         "" +
                         "" +
                         "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                         ",HProjectMoneyID,HTypeSub,HMoney,HTaxRate,HSumMoney) " +
                         " 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 +
                         "')";
                    oCn.RunProc(subSql);
                }
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -99,7 +123,30 @@
                ",'" + omodel.HAccDate.ToShortDateString() + "'," + omodel.HCusID.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.ClsYS_ReceiveOtherBillSub oSub in DetailColl)
                {
                    string subSql = "insert into YS_ReceiveOtherBillSub" +
                         "" +
                         "" +
                         "" +
                         "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                         ",HProjectMoneyID,HTypeSub,HMoney,HTaxRate,HSumMoney) " +
                         " 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 +
                         "')";
                    oCn.RunProc(subSql);
                }
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;