Ejemplo n.º 1
0
        // Default view. Shows workshops with option to filter by project.
        public ActionResult Index(int p = 1, int ps = 50, string sv = "")
        {
            StorePaging(p, ps, sv);

            var model = new WorkshopListModel();

            model.Pager = new Models.TableFooterPagingModel(
                PageNumber,
                PageSize,
                _workshopService.Total(),
                "Workshops", "Index");
            // Set number of columns to span for paging links and item counts
            model.Pager.PageLinkColSpan  = 4;
            model.Pager.ItemCountColspan = 1;

            model.Workshops = _workshopService.GetWorkshops(PageNumber, PageSize, SearchValue);

            return(View(model));
        }