|  |  | 
 |  |  |                 ",HYear='" + omodel.HYear.ToString() + "'" + | 
 |  |  |                 ",HPeriod='" + omodel.HPeriod.ToString() + "'" + | 
 |  |  |                 ",HRemark='" + omodel.HRemark + "'" + | 
 |  |  |                 ",HStockStyle='" + omodel.HStockStyle + "'" + | 
 |  |  |                 ",HUpDater='" + omodel.HMaker+ "'" + | 
 |  |  |                 ",HUpDateDate=getdate()" + | 
 |  |  |                 //======================================== | 
 |  |  | 
 |  |  |                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + | 
 |  |  |                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + | 
 |  |  |                       ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + | 
 |  |  |                       ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + | 
 |  |  |                       ",HQty,HPrice,HMoney,HStockOrgID,HOtherOrgID,HWHID,HSCWHID,HSPID" + | 
 |  |  |                       ",HDesignLife,HLeaveLife,HUseLife" + | 
 |  |  |                       ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + | 
 |  |  |                       ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + | 
 |  |  | 
 |  |  |                       + 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.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HStockOrgID.ToString() + "," + oSub.HOtherOrgID.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + | 
 |  |  |                       "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + | 
 |  |  |                       "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + | 
 |  |  |                       "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + | 
 |  |  | 
 |  |  |                 //主表 | 
 |  |  |                 oCn.RunProc("Insert Into Sc_MouldStockBillMain   " + | 
 |  |  |                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + | 
 |  |  |                 ",HRemark,HMaker,HMakeDate" + | 
 |  |  |                 ",HRemark,HStockStyle,HMaker,HMakeDate" + | 
 |  |  |                 ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + | 
 |  |  |                 ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + | 
 |  |  |                 ",HProcID"+ | 
 |  |  |                 ") " + | 
 |  |  |                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + | 
 |  |  |                 ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + | 
 |  |  |                 ",'" + omodel.HRemark + "','" + omodel.HStockStyle + "','" + omodel.HMaker + "',getdate()" + | 
 |  |  |                 ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + | 
 |  |  |                 ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + | 
 |  |  |                  "," + '0' + | 
 |  |  | 
 |  |  |                       " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + | 
 |  |  |                       ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + | 
 |  |  |                       ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + | 
 |  |  |                       ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + | 
 |  |  |                       ",HQty,HPrice,HMoney,HStockOrgID,HOtherOrgID,HWHID,HSCWHID,HSPID" + | 
 |  |  |                       ",HDesignLife,HLeaveLife,HUseLife" + | 
 |  |  |                       ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + | 
 |  |  |                       ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + | 
 |  |  | 
 |  |  |                       + 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.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HStockOrgID.ToString() + "," + oSub.HStockOrgID.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + | 
 |  |  |                       "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + | 
 |  |  |                       "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + | 
 |  |  |                       "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |