Esempio n. 1
0
        // Default action : Get
        // Lists attendees with agency name
        public ActionResult Index(int p = 1, int ps = 50, string sv = "")
        {
            StorePaging(p, ps, sv);

            var model = new AttendeeListModel();

            model.Pager = new Models.TableFooterPagingModel(
                PageNumber, PageSize,
                _attendeeService.Total(),
                "Attendees", "Index");

            // Enter the number of columns that page links and counts should span
            model.Pager.PageLinkColSpan  = 4;
            model.Pager.ItemCountColspan = 1;

            // Save search value to model
            model.Pager.SearchValue = sv;

            // Get attendees from DB
            model.Attendees = _attendeeService.GetAttendeeWithAgencies(
                model.Pager.PageNum, model.Pager.PageSize, sv);

            return(View(model));
        }