示例#1
0
        public ActionResult Author(string user, int? p, int? commend, string order)
        {
            var iscommend = commend ?? 0;
            var pager = new Pager { PageNo = p ?? 1, PageSize = Configinfo.CatePagerCount };
            pager = MyService.GetAuthorArticlePaging(pager, 1, user, iscommend, order);

            var archivesViewModel = new ArchivesViewModel
            {
                WebPath = "[Author] " + user,
                ArticlePagerInfo = pager
            };
            var articleListParasInfo = new AjaxArticleListParamsModel
            {
                ArticleListType = "author",
                AuthorName = user,
                Commend = iscommend,
                Order = order
            };
            ViewBag.ArticleListParasInfo = articleListParasInfo;
            return View("Archives", archivesViewModel);
        }
示例#2
0
        public ActionResult Tag(string key, int? p, int? commend, string order)
        {
            var iscommend = commend ?? 0;
            var pager = new Pager {PageNo = p ?? 1, PageSize = Configinfo.CatePagerCount};
            pager = MyService.GetTagArticlePaging(pager, 1, key.Replace("@", "."), iscommend, order);

            var archivesViewModel = new ArchivesViewModel
                                   {
                                       WebPath =  "[" + res.Tag + "] " + key.Replace("@", "."),
                                       ArticlePagerInfo = pager
                                   };
            var articleListParasInfo = new AjaxArticleListParamsModel
            {
                ArticleListType = "tag",
                Tag = key,
                Commend = iscommend,
                Order = order
            };
            ViewBag.ArticleListParasInfo = articleListParasInfo;
            return View("Archives", archivesViewModel);
        }
示例#3
0
        public ActionResult Archives(int year, int? month, int? day, int? p, int? commend, string order)
        {
            var iscommend = commend ?? 0;
            var pager = new Pager {PageNo = p ?? 1, PageSize = Configinfo.CatePagerCount};
            pager = MyService.GetArchivesArticlePaging(pager, 1, year, month ?? 0, day ?? 0, iscommend, order);

            var archivesViewModel = new ArchivesViewModel
            {
                WebPath = "[" + res.Archive + "] " + year + (month != null ? "/" + month : string.Empty) + (day != null ? "/" + day : string.Empty),
                ArticlePagerInfo = pager
            };
            var articleListParasInfo = new AjaxArticleListParamsModel
            {
                ArticleListType = "archives",
                Year = year,
                Month = month ?? 0,
                Day = day ?? 0,
                Commend = iscommend,
                Order = order
            };
            ViewBag.ArticleListParasInfo = articleListParasInfo;
            return View(archivesViewModel);
        }