Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 public Rpt_ReportBLL(Guid id, bool bycache)
     : base(DALClassName)
 {
     _dal = (Rpt_ReportDAL)_DAL;
     FillModel(id, bycache);
 }
Exemplo n.º 4
0
 public Rpt_ReportBLL(Guid id)
     : base(DALClassName)
 {
     _dal = (Rpt_ReportDAL)_DAL;
     FillModel(id);
 }
Exemplo n.º 5
0
 ///<summary>
 ///Rpt_ReportBLL
 ///</summary>
 public Rpt_ReportBLL()
     : base(DALClassName)
 {
     _dal = (Rpt_ReportDAL)_DAL;
     _m   = new Rpt_Report();
 }