| | |
| | | public class ClsSc_MouldDotCheckRuleBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsSc_MouldDotCheckRuleBillMain omodel = new Model.ClsSc_MouldDotCheckRuleBillMain(); |
| | | public List<Model.ClsSc_MouldDotCheckRuleBillSub> DetailCol = new List<Model.ClsSc_MouldDotCheckRuleBillSub>(); |
| | | public List<Model.ClsSc_MouldDotCheckRuleBillSub_Item> DetailColl = new List<Model.ClsSc_MouldDotCheckRuleBillSub_Item>(); |
| | | public List<Model.ClsSc_MouldDotCheckRuleBillSub> DetailColl = new List<Model.ClsSc_MouldDotCheckRuleBillSub>(); |
| | | public List<Model.ClsSc_MouldDotCheckRuleBillSub_Item> DetailCol = new List<Model.ClsSc_MouldDotCheckRuleBillSub_Item>(); |
| | | |
| | | public ClsSc_MouldDotCheckRuleBill() |
| | | { |
| | |
| | | //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) |
| | | foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | |
| | | "," + 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(); |
| | |
| | | |
| | | ") "); |
| | | ////æå
¥å表 |
| | | foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailCol) |
| | | foreach (Model.ClsSc_MouldDotCheckRuleBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldDotCheckRuleBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | |
| | | "," + 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; |
| | |
| | | //å¾ªç¯ |
| | | DataSet DsSub; |
| | | DsSub = oCn.RunProcReturn("Select * from Sc_MouldDotCheckRuleBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sc_MouldDotCheckRuleBillSub"); |
| | | DetailCol.Clear();//æ¸
空 |
| | | DetailColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsSc_MouldDotCheckRuleBillSub oSub = new Model.ClsSc_MouldDotCheckRuleBillSub(); |
| | |
| | | oSub.HClaim = DsSub.Tables[0].Rows[0]["HClaim"].ToString().Trim(); |
| | | oSub.HManagerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HManagerID"]); |
| | | |
| | | DetailCol.Add(oSub); |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |