Example #1
0
        public virtual ActionResult Now()
        {
            ViewBag.PageHeader = "تازه ترین های وب ";
            ViewBag.Title      = "همین حالا...";
            var membership = new CmsMembership(_userBusiness);
            var res        = _feedItemBusiness.FeedItemsByTime(DateTime.Now.AddHours(DateTime.Now.NowHour()), 20, 0);

            if (res.Count() < 20)
            {
                var res2 = _feedItemBusiness.FeedItemsByTime(DateTime.Now.AddHours(DateTime.Now.NowHour() - 1), 20 - res.Count(), 0);
                res = res.Concat(res2).ToList();
            }
            return(View("_FeedItems." + CmsConfig.ThemeName, res));
        }
Example #2
0
        public virtual ActionResult Index()
        {
            var items = _feedItemBusiness.FeedItemsByTime(DateTime.Now, 20, 0);

            return(View(items));
        }