using System;
|
using System.Collections.Generic;
|
using System.Text;
|
|
namespace BLL
|
{
|
public class Cls_S_KF_ICInventoryList_IF
|
{
|
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_IF oFrm = new KF_ICInventoryList_IF();
|
const string ViewName = "h_v_KF_ICInventoryList_IF";
|
public List<DBUtility.BillSelect> oBillSelectColl = new List<DBUtility.BillSelect>();
|
//
|
public Cls_S_KF_ICInventoryList_IF()
|
{
|
mvarReportTitle = "即时库存";
|
mvarItemKey = "JSKC";
|
}
|
//
|
public bool Refresh(string sWhere)
|
{
|
string sErr = "";
|
int MainIDCol, SubIDCol, SPIDCol, BatchNoCol, AuxPropIDCol, MTONoCol, HProduceDateCol, HExpiryDateCol;
|
string stmp;
|
string tSQL;
|
try
|
{
|
oFrm.sDlgWhere = sWhere;
|
oFrm.ShowDialog();
|
//返回数据到集合中
|
oBillSelectColl.Clear();
|
MainIDCol = oFrm.Fun_GetCol("hmaterid");
|
SubIDCol = oFrm.Fun_GetCol("hwhid");
|
SPIDCol = oFrm.Fun_GetCol("hspid");
|
BatchNoCol = oFrm.Fun_GetCol("批次");
|
AuxPropIDCol = oFrm.Fun_GetCol("HAuxPropID");
|
MTONoCol = oFrm.Fun_GetCol("计划跟踪号");
|
HProduceDateCol = oFrm.Fun_GetCol("生产日期");
|
HExpiryDateCol = 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.HAuxPropID = DBUtility.ClsPub.isLong(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[AuxPropIDCol].Value);
|
oSelect.BillNo = DBUtility.ClsPub.isStrNull(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[MTONoCol].Value);
|
oSelect.HProduceDate = DBUtility.ClsPub.isStrNull(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[HProduceDateCol].Value);
|
oSelect.HExpiryDate = DBUtility.ClsPub.isStrNull(oFrm.grdMain.Rows[oFrm.grdMain.SelectedRows[i].Index].Cells[HExpiryDateCol].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;
|
}
|
|
public bool Refresh()
|
{
|
string sErr = "";
|
int MainIDCol, SubIDCol, SPIDCol, BatchNoCol;
|
string stmp;
|
string tSQL;
|
try
|
{
|
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;
|
}
|
|
|
}
|
}
|