yangle
2022-12-28 88ebcc59f00e2fc135e6dc6fec648fe5bf82e2e0
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldDotCheckRuleBill.cs
@@ -58,7 +58,7 @@
                //DeleteRelation(ref sReturn, lngBillKey);
                ////删除子表
                DeleteBillSub(lngBillKey);
                oCn.RunProc("delete from Sc_MouldDotCheckRuleBillSub_Item where HInterID=" + lngBillKey);
                //oCn.RunProc("delete from Sc_MouldDotCheckRuleBillSub_Item where HInterID=" + lngBillKey);
                ////插入子表
                omodel.HInterID = lngBillKey;
                foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailCol)
@@ -75,20 +75,20 @@
                      "," + oSub.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
                      ") ");
                }
                foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub_Item " +
                    " (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_MouldDotCheckRuleBillSub_Item oSub in DetailColl)
                //{
                //    oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub_Item " +
                //    " (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() +
                //    ") ");
                //}
                sReturn = "修改单据成功!";
                oCn.Commit();
@@ -136,20 +136,20 @@
                     "," + oSub.HDotCheckItemID.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'," + oSub.HManagerID.ToString() +
                     ") ");
                }
                foreach (Model.ClsSc_MouldDotCheckRuleBillSub_Item oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub_Item " +
                    " (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_MouldDotCheckRuleBillSub_Item oSub in DetailColl)
                //{
                //    oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub_Item " +
                //    " (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() +
                //    ") ");
                //}
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;