Пример #1
0
 public static MvcHtmlString SortHeader(this HtmlHelper html, PagedViewModel data, string text, string prop, string action)
 {
     bool desc = data.SortDesc;
     if (data.SortBy.Equals(prop, StringComparison.OrdinalIgnoreCase)) desc = !desc;
     return html.ActionLink(text, action, new { page=1, sort=prop, desc });
 }
Пример #2
0
 public static MvcHtmlString Pager(this HtmlHelper html, PagedViewModel data, string action)
 {
     data.Action = action;
     return html.Partial("Pager", data);
 }