| | |
| | | ",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() + |
| | | |
| | | ") "); |
| | | |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //审核 |
| | | public bool CheckBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | |
| | | try |
| | | { |
| | | string HChecker = DBUtility.ClsPub.CurUserName; |
| | | string HCheckDate = DBUtility.ClsPub.GetServerDate(-1); |
| | | oCn.BeginTran(); |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HBillStatus='2',HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString()); |
| | | oCn.Commit(); |
| | | //生成调拨单 |
| | | //得到调拨单 mainid 单据号 |
| | | //long NewInterID = DBUtility.ClsPub.CreateBillID("1207", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //string NewBillNo = DBUtility.ClsPub.CreateBillCode("1207", ref DBUtility.ClsPub.sExeReturnInfo, true);//得到新单号 |
| | | //oCn.RunProc("exec h_p_Kf_MoveStockBill_Add " + lngBillKey.ToString() + "," + NewInterID.ToString() + ",'" + NewBillNo + "','" + HChecker + "'"); |
| | | // |
| | | sReturn = "审核单据成功!"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //反审核 |
| | | public bool AbandonCheck(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | |
| | | try |
| | | { |
| | | string HChecker = DBUtility.ClsPub.CurUserName; |
| | | string HCheckDate = DBUtility.ClsPub.GetServerDate(-1); |
| | | oCn.BeginTran(); |
| | | //还原单据状态为未审核状态 |
| | | oCn.RunProc(" Update " + MvarItemKey + " set HBillStatus='1',HChecker='',HCheckDate='' Where HInterID=" + lngBillKey.ToString()); |
| | | sReturn = "反审核单据成功!"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |