using System;
|
using System.Collections.Generic;
|
using System.Text;
|
using System.Data;
|
|
namespace BLL
|
{
|
/// <summary>
|
/// 单据编号规则表
|
/// </summary>
|
public class ClsGy_BillNumber_View:DBUtility.ClsGy_Base_View
|
{
|
|
//
|
public ClsGy_BillNumber_Model omodel = new ClsGy_BillNumber_Model();
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
public ClsGy_BillNumber_View()
|
{
|
base.MvarReportTitle = "单据编号规则表设置";
|
base.MvarItemKey = "Gy_BillNumber";
|
}
|
//
|
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_BillNumber_Model();
|
omodel.BillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["BillType"]);
|
omodel.BillCode = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["BillCode"]);
|
omodel.BillName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["BillName"]);
|
omodel.BillCodeMode = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["BillCodeMode"]);
|
omodel.Profix = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["Profix"]);
|
omodel.CodeLen = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["CodeLen"]);
|
omodel.TotalLen = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["TotalLen"]);
|
omodel.Glida = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["Glida"]);
|
omodel.IDNow = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["IDNow"]);
|
return true;
|
|
}
|
catch (Exception e)
|
{
|
throw (e);
|
}
|
}
|
}
|
}
|