62,254
社区成员
发帖
与我相关
我的任务
分享 public class Xl_主类
{
private readonly Maticsoft.DAL.Xl_主类 dal=new Maticsoft.DAL.Xl_主类();
public Xl_主类()
{}
#region 成员方法
/// <summary>
/// 得到最大ID
/// </summary>
public int GetMaxId()
{
return dal.GetMaxId();
}
/// <summary>
/// 是否存在该记录
/// </summary>
public bool Exists(int 主类流水号)
{
return dal.Exists(主类流水号);
}
/// <summary>
/// 增加一条数据
/// </summary>
public int Add(Maticsoft.Model.Xl_主类 model)
{
return dal.Add(model);
}
/// <summary>
/// 更新一条数据
/// </summary>
public void Update(Maticsoft.Model.Xl_主类 model)
{
dal.Update(model);
}
/// <summary>
/// 删除一条数据
/// </summary>
public void Delete(int 主类流水号)
{
dal.Delete(主类流水号);
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Maticsoft.Model.Xl_主类 GetModel(int 主类流水号)
{
return dal.GetModel(主类流水号);
}
/// <summary>
/// 得到一个对象实体,从缓存中。
/// </summary>
public Maticsoft.Model.Xl_主类 GetModelByCache(int 主类流水号)
{
string CacheKey = "Xl_主类Model-" + 主类流水号;
object objModel = LTP.Common.DataCache.GetCache(CacheKey);
if (objModel == null)
{
try
{
objModel = dal.GetModel(主类流水号);
if (objModel != null)
{
int ModelCache = LTP.Common.ConfigHelper.GetConfigInt("ModelCache");
LTP.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
}
}
catch{}
}
return (Maticsoft.Model.Xl_主类)objModel;
}
/// <summary>
/// 获得数据列表
/// </summary>
public DataSet GetList(string strWhere)
{
return dal.GetList(strWhere);
}
/// <summary>
/// 获得前几行数据
/// </summary>
public DataSet GetList(int Top,string strWhere,string filedOrder)
{
return dal.GetList(Top,strWhere,filedOrder);
}