示例#1
0
        public ActionResult EventCancelation(EventCancellationModelFilter filter = null, int pageNumber = 1)
        {
            int totalRecords;
            var model = _eventReportingService.GetCancelledEventsList(pageNumber, _pageSize, filter, out totalRecords);

            if (model == null)
            {
                model = new EventCancellationListModel();
            }
            model.Filter = filter;

            var currentAction          = ControllerContext.RouteData.Values["action"].ToString();
            Func <int, string> urlFunc =
                pn => Url.Action(currentAction, new
            {
                pageNumber = pn,
                filter.FromDate,
                filter.ToDate,
                filter.EventId
            });

            model.PagingModel = new PagingModel(pageNumber, _pageSize, totalRecords, urlFunc);

            return(View(model));
        }