yangle
2022-08-09 88bb69435005d4fb19ac431e9d4dff851df2e1b6
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainRuleBill.cs
@@ -62,65 +62,36 @@
                ////删除子表
                DeleteBillSub(lngBillKey);
                DeleteBillSub2(lngBillKey);
                DeleteBillSub3(lngBillKey);
                DeleteBillSub4(lngBillKey);
                ////插入子表
                omodel.HInterID = lngBillKey;
                ////插入子表
                foreach (Model.ClsSc_MouldMaintainRuleBillSub oSub in DetailColl_Mater)
                {
                    oCn.RunProc("Insert into Sc_MouldMaintainRuleBillSub " +
                     " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                     ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                     ",HMaterID,HUnitID" +
                     ",HQty,HQtyMust" +
                     ") 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.HMaterID.ToString() + "," + oSub.HUnitID.ToString() +
                     "," + oSub.HQty.ToString() + "," + oSub.HQtyMust.ToString() +
                     ") ");
                    " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                    ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                    ",HMaterID,HUnitID" +
                    ",HQty,HQtyMust" +
                    ") 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.HMaterID.ToString() + "," + oSub.HUnitID.ToString() +
                    "," + oSub.HQty.ToString() + "," + oSub.HQtyMust.ToString() +
                    ") ");
                }
                foreach (Model.ClsSc_MouldMaintainRuleBillSub_Item oSub in DetailColl_Pay)
                {
                    oCn.RunProc("Insert into Sc_MouldMaintainRuleBillSub_Item " +
                     " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                     ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                     ",HMaintainItemID,HMaintainItem,HMaintainPart" +
                     ",HClaim,HManagerID" +
                     ") 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.HMaintainItemID.ToString() + ",'" + oSub.HMaintainItem + "','" + oSub.HMaintainPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
                     ") ");
                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HMaintainItemID,HMaintainItem,HMaintainPart" +
                      ",HClaim,HManagerID" +
                      ") 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.HMaintainItemID.ToString() + ",'" + oSub.HMaintainItem + "','" + oSub.HMaintainPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
                      ") ");
                }
                //foreach (Model.ClsSc_MouldMaintainRuleBillSub_Entrust oSub in DetailColl_Entrust)
                //{
                //    oCn.RunProc("Insert into Sc_MouldMaintainRuleBillSub_Entrust " +
                //     " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                //     ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                //     ",HMaterID,HUnitID,HProcID" +
                //     ",HQty,HPrice,HMoney" +
                //     ") 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.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HProcID.ToString() +
                //     "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() +
                //     ") ");
                //}
                //foreach (Model.ClsSc_MouldMaintainRuleBillSub_Money oSub in DetailColl_Money)
                //{
                //    oCn.RunProc("Insert into Sc_MouldMaintainRuleBillSub_Money " +
                //     " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                //     ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                //     ",HItMoneyID" +
                //     ",HQty,HPrice,HMoney" +
                //     ") 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.HItMoneyID.ToString() +
                //     "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() +
                //     ") ");
                //}
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
@@ -179,34 +150,6 @@
                      "," + oSub.HMaintainItemID.ToString() + ",'" + oSub.HMaintainItem + "','" + oSub.HMaintainPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
                      ") ");
                }
                //foreach (Model.ClsSc_MouldMaintainRuleBillSub_Entrust oSub in DetailColl_Entrust)
                //{
                //    oCn.RunProc("Insert into Sc_MouldMaintainRuleBillSub_Entrust " +
                //     " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                //     ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                //     ",HMaterID,HUnitID,HProcID" +
                //     ",HQty,HPrice,HMoney" +
                //     ") 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.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HProcID.ToString() +
                //     "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() +
                //     ") ");
                //}
                //foreach (Model.ClsSc_MouldMaintainRuleBillSub_Money oSub in DetailColl_Money)
                //{
                //    oCn.RunProc("Insert into Sc_MouldMaintainRuleBillSub_Money " +
                //     " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                //     ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                //     ",HItMoneyID" +
                //     ",HQty,HPrice,HMoney" +
                //     ") 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.HItMoneyID.ToString() +
                //     "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() +
                //     ") ");
                //}
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;