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 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));
        }
Ejemplo n.º 3
0
 public RouteValueDictionary AddCategoryFilter(string category)
 {
     return(_queryUrl == null ? new RouteValueDictionary() : _queryUrl.AddQueriesToUrl(new Dictionary <string, string> {
         { "Category", category }, { "Page", "1" }
     }));
 }