コード例 #1
0
        public ActionResult Index(Category listName, int pageIndex = 0)
        {
            ArticleAbstractsList articleAbstracts = new ArticleAbstractsList
            {
                Category            = listName,
                NextPreviousOptions = NextPreviousOptions.ForPageIndex(pageIndex, articles.Count(article => article.Category == Category.News)),
                ArticleAbstracts    = GetAbstractsForPageIndex(listName, pageIndex)
            };

            return(View(articleAbstracts));
        }
コード例 #2
0
        public ActionResult Index(int pageIndex = 0)
        {
            GalleryLink[] galleryLinks = GetGalleryLinks(pageIndex);

            Galleries galleriesModel = new Galleries
            {
                Category            = Category.Gallery,
                Gallery             = galleryLinks,
                NextPreviousOptions = NextPreviousOptions.ForPageIndex(pageIndex, galleries.Count())
            };

            return(View(galleriesModel));
        }