コード例 #1
0
        /// <summary>
        /// 昨日发帖总数
        /// </summary>
        /// <returns></returns>
        public int BBSYesterdayCount()
        {
            string SysName = CacheName.BBSYesterdayCount.ToString();
            string count = null;
            object value = null;
            if (SysCache.Contains(SysName))
            {
                value = SysCache.Get(SysName);
            }
            if (value != null)
                return int.Parse(value.ToString());

            bizBBSMain b = new bizBBSMain();
            bizBBSDE bd = new bizBBSDE();
            count = (b.CountByYesterday() + bd.CountByYesterday()).ToString();
            SysCache.Add(SysName, count, new AbsoluteTime(DateTime.Now.AddMinutes(10)));
            return int.Parse(count);
        }