/// <summary> ///清除浏览记录 /// </summary> /// <param name="ReportID"></param> /// <param name="StaffID"></param> public static void DeleteViewTimes(Guid ReportID, int StaffID) { string CacheKey = "Cache-Rpt_ReportBLL-GetFrequentByStaff-" + StaffID.ToString(); DataCache.RemoveCache(CacheKey); Rpt_ReportDAL dal = (Rpt_ReportDAL)DataAccess.CreateObject(DALClassName); dal.DeleteViewTimes(ReportID, StaffID); }
/// <summary> /// 获取最常用的报表 /// </summary> /// <param name="staff"></param> /// <returns></returns> public static DataTable GetFrequentByStaff(int staff) { string CacheKey = "Cache-Rpt_ReportBLL-GetFrequentByStaff-" + staff.ToString(); DataTable dt = (DataTable)DataCache.GetCache(CacheKey); if (dt == null) { Rpt_ReportDAL dal = (Rpt_ReportDAL)DataAccess.CreateObject(DALClassName); dt = Tools.ConvertDataReaderToDataTable(dal.GetFrequentByStaff(staff)); #region 写入缓存 DataCache.SetCache(CacheKey, dt, DateTime.Now.AddMinutes(30), Cache.NoSlidingExpiration); #endregion } return(dt); }
public Rpt_ReportBLL(Guid id, bool bycache) : base(DALClassName) { _dal = (Rpt_ReportDAL)_DAL; FillModel(id, bycache); }
public Rpt_ReportBLL(Guid id) : base(DALClassName) { _dal = (Rpt_ReportDAL)_DAL; FillModel(id); }
///<summary> ///Rpt_ReportBLL ///</summary> public Rpt_ReportBLL() : base(DALClassName) { _dal = (Rpt_ReportDAL)_DAL; _m = new Rpt_Report(); }