Esempio n. 1
0
        public ActionResult List()
        {
            // can add pager
            var entries = _contactFormService.GetEntries().OrderByDescending(x => x.As <CommonPart>().CreatedUtc).ToList();
            var vm      = new ContactFormEntryListViewModel {
                ContactFormEntries = entries
            };

            return(View(vm));
        }
Esempio n. 2
0
        public ActionResult Index(PagerParameters pagerParameters)
        {
            Pager pager             = new Pager(_siteService.GetSiteSettings(), pagerParameters);
            var   contactEntryCount = _contactFormService.GetEntries().Count();
            var   entries           = _contactFormService.GetEntries().ToList();//.Select(e => _contactFormService.Convert(e)).ToList(); // TODO add paging;
            var   pagerShape        = Shape.Pager(pager).TotalItemsCount(contactEntryCount);


            var vm = new ContactFormEntryListViewModel {
                ContactFormEntries = entries, Pager = pager
            };

            return(View(vm));
            //return null;
        }