using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using SQLHelper;
|
using DBUtility;
|
|
namespace DAL
|
{
|
public class Cls_S_Cg_POInStockBill
|
{
|
private string mvarReportTitle;
|
public string MvarReportTitle
|
{
|
get { return mvarReportTitle; }
|
set { mvarReportTitle = value; }
|
}
|
private string mvarItemKey;
|
public string MvarItemKey
|
{
|
get { return mvarItemKey; }
|
set { mvarItemKey = value; }
|
}
|
frmHlpBillList oFrm = new frmHlpBillList();
|
const string ViewName = "h_v_Cg_POInStockBillList";
|
public List<DBUtility.BillSelect> oBillSelectColl = new List<DBUtility.BillSelect>();
|
//
|
public Cls_S_Cg_POInStockBill()
|
{
|
mvarReportTitle = "收料通知单";
|
mvarItemKey = "1103";
|
}
|
//
|
public bool Refresh(string sWhere)
|
{
|
string sErr = "";
|
int MainIDCol, SubIDCol, BillNoCol;
|
string tSQL;
|
ClsCN oCn = new ClsCN();
|
tSQL = sWhere + " and isnull(审核人,'')<>'' order by 单据号 desc,hsubid ";
|
try
|
{
|
oFrm.sPrimaryCol = "供应商";
|
oFrm.Text = mvarReportTitle;
|
oFrm.lblCaption.Text = mvarReportTitle;
|
oFrm.tSQL = tSQL;
|
oFrm.ViewName = ViewName;
|
oFrm.ShowDialog();
|
//返回数据到集合中
|
oBillSelectColl.Clear();
|
MainIDCol = oFrm.Fun_GetCol("hmainid");
|
SubIDCol = oFrm.Fun_GetCol("hsubid");
|
BillNoCol = oFrm.Fun_GetCol("单据号");
|
int SelectCol = oFrm.Fun_GetCol("选择");
|
//
|
for (int i = oFrm.grdMain.FixedRows; i < oFrm.grdMain.Rows - 1; i++)
|
{
|
if (ClsPub.isStrNull( oFrm.grdMain.get_TextMatrix(i, SelectCol)) == "*")
|
{
|
BillSelect oSelect = new BillSelect();
|
oSelect.BillNo = ClsPub.isStrNull(oFrm.grdMain.get_TextMatrix(i, BillNoCol));
|
oSelect.BillMainID = ClsPub.isLong(oFrm.grdMain.get_TextMatrix(i, MainIDCol));
|
oSelect.BillSubID = ClsPub.isLong(oFrm.grdMain.get_TextMatrix(i, SubIDCol));
|
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;
|
}
|
|
}
|
}
|