| | |
| | | { |
| | | public Model.ClsSc_MouldDotCheckPlanBillMain omodel = new Model.ClsSc_MouldDotCheckPlanBillMain(); |
| | | public List<Model.ClsSc_MouldDotCheckPlanBillSub> DetailColl = new List<Model.ClsSc_MouldDotCheckPlanBillSub>(); |
| | | //public List<Model.ClsSc_MouldDotCheckPlanBillSub_Item> DetailCol = new List<Model.ClsSc_MouldDotCheckPlanBillSub_Item>(); |
| | | |
| | | public ClsSc_MouldDotCheckPlanBill() |
| | | { |
| | |
| | | //======================================== |
| | | ",HCycleUnit='" + omodel.HCycleUnit + "'" + |
| | | ",HCheckCycle=" + omodel.HCheckCycle.ToString() + |
| | | ",HMouldDotCheckRuleID=" + omodel.HMouldDotCheckRuleID + |
| | | |
| | | |
| | | ",HMouldID=" + omodel.HMouldID.ToString() + |
| | |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //鍒犻櫎瀛愯〃 |
| | | DeleteBillSub(lngBillKey); |
| | | //oCn.RunProc("delete from Sc_MouldDotCheckPlanBillSub_Item where HInterID=" + lngBillKey); |
| | | //鎻掑叆瀛愯〃 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsSc_MouldDotCheckPlanBillSub oSub in DetailColl) |
| | |
| | | oCn.RunProc("Insert into Sc_MouldDotCheckPlanBillSub " + |
| | | " (HInterID,HEntryID" + |
| | | ",HManagerID"+ |
| | | ",HDotCheckItem,HDotCheckPart,HClaim"+ |
| | | ",HDotCheckItem,HDotCheckItemID,HDotCheckPart,HClaim" + |
| | | ",HCloseMan,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + |
| | | "," + oSub.HManagerID.ToString() + |
| | | ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" + |
| | | ",'" + oSub.HDotCheckItem +"'," + oSub.HDotCheckItemID + ",'" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" + |
| | | ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'"+ |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | ") "); |
| | | } |
| | | |
| | | ////閰嶄欢椤圭洰 |
| | | //foreach (Model.ClsSc_MouldDotCheckPlanBillSub_Item oSub in DetailCol) |
| | | //{ |
| | | // oCn.RunProc("Insert into Sc_MouldDotCheckPlanBillSub_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_MouldDotCheckPlanBillSub oSub in DetailColl) |
| | | //{ |
| | |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HMouldID,HBeginDate"+ |
| | | ",HEndDate,HCycleUnit,HCheckCycle" + |
| | | ",HInnerBillNo,HExplanation" + |
| | | ",HInnerBillNo,HExplanation,HMouldDotCheckRuleID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+ |
| | | "," + omodel.HMouldID.ToString() + ",'" + omodel.HBeginDate + "'" + |
| | | ",'" + omodel.HEndDate + "','" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "," + omodel.HMouldDotCheckRuleID + |
| | | ") "); |
| | | //鎻掑叆瀛愯〃 |
| | | //鎻掑叆瀛愯〃 //鐐规椤圭洰 |
| | | foreach (Model.ClsSc_MouldDotCheckPlanBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldDotCheckPlanBillSub " + |
| | |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | ") "); |
| | | } |
| | | |
| | | ////閰嶄欢椤圭洰 |
| | | //foreach (Model.ClsSc_MouldDotCheckPlanBillSub_Item oSub in DetailCol) |
| | | //{ |
| | | // oCn.RunProc("Insert into Sc_MouldDotCheckPlanBillSub_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_MouldDotCheckPlanBillSub oSub in DetailColl) |
| | | //{ |