using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using System.Data;
|
|
namespace BLL
|
{
|
/// <summary>
|
/// 单据内码规则表
|
/// </summary>
|
public class ClsGy_MaxNum_View:DBUtility.ClsGy_Base_View
|
{
|
|
//
|
public ClsGy_MaxNum_Model omodel = new ClsGy_MaxNum_Model();
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
public ClsGy_MaxNum_View()
|
{
|
base.MvarReportTitle = "单据内码规则表设置";
|
base.MvarItemKey = "Gy_MaxNum";
|
}
|
//
|
public void Dispose()
|
{
|
GC.SuppressFinalize(this);
|
}
|
//
|
|
//返回项目信息
|
public bool GetInfoByID(string sItemID)
|
{
|
DataSet DS ;
|
try
|
{
|
DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where BillCode='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
|
if (DS.Tables[0].Rows.Count == 0)
|
return false;
|
else
|
{
|
return GetInfo(DS);
|
}
|
}
|
catch (Exception e)
|
{
|
throw (e);
|
}
|
}
|
|
//返回项目信息
|
public override bool GetInfo(DataSet Ds)
|
{
|
try
|
{
|
omodel = new ClsGy_MaxNum_Model();
|
omodel.BillCode = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["BillCode"]);
|
omodel.WhCode = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["WhCode"]);
|
omodel.KjYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["KjYear"]);
|
omodel.Period = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["Period"]);
|
omodel.NowNumber = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["NowNumber"]);
|
return true;
|
|
}
|
catch (Exception e)
|
{
|
throw (e);
|
}
|
}
|
}
|
}
|