public static MvcHtmlString FilterOptionLink( this HtmlHelper htmlHelper, string text, string value, BaseFilter filter, object htmlAttributes = null) { var currentRouteValues = htmlHelper.ViewContext.RequestContext.HttpContext.Request.QueryString.ToRouteValueDictionary(); var newRouteValues = new Dictionary<string, object> { { "area", "IlaroAdmin" }, { "page", "1" }, { filter.Property.Name, value } }; return htmlHelper.ActionLink( text, htmlHelper.ViewContext.RouteData.Values["action"].ToStringSafe() ?? "Index", "Entities", Merge(currentRouteValues, new RouteValueDictionary(newRouteValues)), HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)); }
public WrappedFilterOption(BaseFilter filter, SelectListItem option) { Filter = filter; Option = option; }