using System; using System.Collections.Generic; using System.Text; namespace BLL { public class Cls_S_KF_ICInventoryList { private string mvarReportTitle; public string MvarReportTitle { get { return mvarReportTitle; } set { mvarReportTitle = value; } } private string mvarItemKey; public string MvarItemKey { get { return mvarItemKey; } set { mvarItemKey = value; } } KF_ICInventoryList oFrm = new KF_ICInventoryList(); const string ViewName = "h_v_KF_ICInventoryList"; public List oBillSelectColl = new List(); // public string sKeyCol = ""; // public Cls_S_KF_ICInventoryList() { mvarReportTitle = "即时库存"; mvarItemKey = "JSKC"; } // public bool Refresh() { string sWhere; string sErr = ""; int MainIDCol, SubIDCol, SPIDCol, BatchNoCol; string stmp; string tSQL; try { oFrm.sPrimaryCol = sKeyCol; oFrm.ShowDialog(); //返回数据到集合中 oBillSelectColl.Clear(); MainIDCol = oFrm.Fun_GetCol("hmaterid"); SubIDCol = oFrm.Fun_GetCol("hwhid"); SPIDCol = oFrm.Fun_GetCol("hspid"); BatchNoCol = oFrm.Fun_GetCol("批次"); // //循环 选中行 if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK) { for (int i = 0; i < oFrm.grdMain.SelectedRows.Count; i++) { DBUtility.BillSelect oSelect = new DBUtility.BillSelect(); oSelect.BillMainID = DBUtility.ClsPub.isLong(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[MainIDCol].Value); oSelect.BillSubID = DBUtility.ClsPub.isLong(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[SubIDCol].Value); oSelect.SPID = DBUtility.ClsPub.isLong(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[SPIDCol].Value); oSelect.BatchNo = DBUtility.ClsPub.isStrNull(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[BatchNoCol].Value); oSelect.BillTitle = mvarReportTitle; oSelect.BillType = mvarItemKey; oBillSelectColl.Add(oSelect); } } // if (oBillSelectColl.Count > 0) return true; else return false; } catch (Exception e) { sErr = e.Message; } return true; } } }