1
duhe
2024-12-31 98fdb31018bde24c16598b98cdd1cf526dc1113f
DAL/Öʼì¹ÜÀí/ClsQC_MonthTarGetBill.cs
@@ -73,6 +73,26 @@
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
                omodel.HInterID = lngBillKey;
                //插入子表
                foreach (Model.ClsQC_MonthTarGetBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into QC_MonthTarGetBillSub " +
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HSupID,HSupQty" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       ",'" + oSub.HSupID.ToString() + "','" + oSub.HSupQty.ToString() +
                       "') ");
                }
                //=========================保存后控制  
                //DataSet ds2 = oCn.RunProcReturn("Exec h_p_QC_MonthTarGetBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_QC_MonthTarGetBill_AfterSaveCtrl");
                //if (ds2 == null)
@@ -153,6 +173,21 @@
                    ")";
                    oCn.RunProc(mainSql);
                //插入子表
                foreach (Model.ClsQC_MonthTarGetBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into QC_MonthTarGetBillSub " +
                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HSupID,HSupQty" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       ",'" + oSub.HSupID.ToString() + "','" + oSub.HSupQty.ToString() +
                       "') ");
                }
                //=========================保存后控制  
                //DataSet ds2 = oCn.RunProcReturn("Exec h_p_QC_MonthTarGetBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_QC_MonthTarGetBill_AfterSaveCtrl");
                //if (ds2 == null)