| | |
| | | { |
| | | public class ClsKf_MateOutBackBill:DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsKf_ICStockBillMain omodel = new Model.ClsKf_ICStockBillMain(); |
| | | public List<Model.ClsKf_ICStockBillSub> DetailColl = new List<Model.ClsKf_ICStockBillSub>(); |
| | | public List<Model.ClsKf_ICStockBillScheme> DetailSubColl = new List<Model.ClsKf_ICStockBillScheme>(); |
| | | public Models.ClsKf_ICStockBillMain omodel = new Models.ClsKf_ICStockBillMain(); |
| | | public List<Models.ClsKf_ICStockBillSub> DetailColl = new List<Models.ClsKf_ICStockBillSub>(); |
| | | public List<Models.ClsKf_ICStockBillScheme> DetailSubColl = new List<Models.ClsKf_ICStockBillScheme>(); |
| | | |
| | | public ClsKf_MateOutBackBill() |
| | | { |
| | |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HBillSubType='" + omodel.HBillSubType.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | |
| | | DeleteBillSub(lngBillKey); |
| | | //插入子表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsKf_ICStockBillSub oSub in DetailColl) |
| | | foreach (Models.ClsKf_ICStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Kf_ICStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | " values('" + this.BillType + "','" + omodel.HBillSubType.ToString() + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',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) + |
| | | ") "); |
| | | //插入子表 |
| | | foreach (Model.ClsKf_ICStockBillSub oSub in DetailColl) |
| | | foreach (Models.ClsKf_ICStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Kf_ICStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | |
| | | DetailColl.Clear();//清空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsKf_ICStockBillSub oSub = new Model.ClsKf_ICStockBillSub(); |
| | | Models.ClsKf_ICStockBillSub oSub = new Models.ClsKf_ICStockBillSub(); |
| | | // 固定赋值=============================================== |
| | | oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); |
| | | oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); |
| | |
| | | DetailSubColl.Clear();//清空 |
| | | for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsKf_ICStockBillScheme oSubSec = new Model.ClsKf_ICStockBillScheme(); |
| | | Models.ClsKf_ICStockBillScheme oSubSec = new Models.ClsKf_ICStockBillScheme(); |
| | | oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"].ToString()); |
| | | oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"].ToString()); |
| | | oSubSec.HItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HItemID"].ToString()); |