|  |  | 
 |  |  |                 ",HUpDateDate=getdate()" + | 
 |  |  |                 //======================================== | 
 |  |  |                 ",HSupID=" + omodel.HSupID.ToString() + | 
 |  |  |                 ",HSupTypeID=" + omodel.HSupTypeID.ToString() + | 
 |  |  |                 ",HWHID=" + omodel.HWHID.ToString() + | 
 |  |  |                 //",HSCWHID=" + omodel.HSCWHID.ToString() + | 
 |  |  |                 //",HEmpID=" + omodel.HEmpID.ToString() + | 
 |  |  | 
 |  |  |                          ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + | 
 |  |  |                          ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + | 
 |  |  |                          ",HDesignLife,HLeaveLife" + | 
 |  |  |                          ",HSCSPID,HSPGroupID,HBatchNo,HUseLife" + | 
 |  |  |                          ",HSCSPID,HSPGroupID,HBatchNo,HUseLife,HStockOrgID" + | 
 |  |  |                           ") 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.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + | 
 |  |  |                          "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + | 
 |  |  |                          "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + | 
 |  |  |                          "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HUseLife.ToString() + | 
 |  |  |                          "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HUseLife.ToString() + "," + oSub.HStockOrgID.ToString() + | 
 |  |  |  | 
 |  |  |                            ") "); | 
 |  |  |  | 
 |  |  | 
 |  |  |                 oCn.RunProc("Insert Into Sc_MouldStockBillMain   " + | 
 |  |  |                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + | 
 |  |  |                 ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + | 
 |  |  |                 ",HSupID,HWHID,HManagerID,HSCWHID,HEmpID,HSecManagerID" + | 
 |  |  |                 ",HSupTypeID,HSupID,HWHID,HManagerID,HSCWHID,HEmpID,HSecManagerID" + | 
 |  |  |                 ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + | 
 |  |  |                 ""+ | 
 |  |  |                 ") " + | 
 |  |  |                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + | 
 |  |  |                 ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + | 
 |  |  |                 ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HSecManagerID.ToString() +  | 
 |  |  |                 ", " + omodel.HSupTypeID.ToString() + ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HSecManagerID.ToString() +  | 
 |  |  |                 ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + | 
 |  |  |                 ") "); | 
 |  |  |                 //插入子表 | 
 |  |  | 
 |  |  |                          ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + | 
 |  |  |                          ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + | 
 |  |  |                          ",HDesignLife,HLeaveLife" + | 
 |  |  |                          ",HSCSPID,HSPGroupID,HBatchNo,HUseLife" + | 
 |  |  |                          ",HSCSPID,HSPGroupID,HBatchNo,HUseLife,HStockOrgID" + | 
 |  |  |                           ") 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.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + | 
 |  |  |                          "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + | 
 |  |  |                          "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + | 
 |  |  |                          "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HUseLife.ToString() + | 
 |  |  |                          "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HUseLife.ToString()+","+ oSub.HStockOrgID.ToString() + | 
 |  |  |  | 
 |  |  |                            ") "); | 
 |  |  |  |