Ejemplo n.º 1
0
        public static string BuildUrl(int pageNumber, QueryUrl queryUrl, IUrlHelperWrapper urlHelper)
        {
            RouteValueDictionary routeValueDictionary = queryUrl.AddQueriesToUrl(
                new Dictionary <string, string>
            {
                {
                    "Page", pageNumber.ToString()
                }
            });

            return(urlHelper.RouteUrl(routeValueDictionary));
        }
Ejemplo n.º 2
0
 public void SetQueryUrl(QueryUrl queryUrl)
 {
     _queryUrl = queryUrl;
 }
Ejemplo n.º 3
0
        public static string BuildPageSizeUrl(int defaultPageSize, int maxItemsPerPage, int totalItems, QueryUrl queryUrl, IUrlHelperWrapper urlHelper)
        {
            var pageSize = GetOtherPageSizeByCurrentPageSize(maxItemsPerPage, totalItems, defaultPageSize);
            RouteValueDictionary routeValueDictionary = queryUrl.AddQueriesToUrl(
                new Dictionary <string, string>
            {
                {
                    "pageSize", pageSize.ToString()
                },
                {
                    "page", 1.ToString()
                }
            });

            return(urlHelper.RouteUrl(routeValueDictionary));
        }