Beispiel #1
0
        public ActionResult InsurancePayment(int pageNumber = 1, InsurancePaymentListModelFilter filter = null)
        {
            int totalRecords;
            var model = _financeReportingService.GetInsurancePayment(pageNumber, _pageSize, filter, out totalRecords);

            if (model == null)
            {
                model = new InsurancePaymentListModel();
            }

            model.Filter = filter;

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

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

            return(View(model));
        }