public static string Grid <TGridModel>(this UrlHelper helper) where TGridModel : class { var controllerName = HelperUtil.GetControllerName <TGridModel>(); return(Grid(helper, controllerName)); }
private static string Action <TModel>(UrlHelper helper, string actionName, TModel model, object routeValues) where TModel : class { var controllerName = HelperUtil.GetControllerName(model); return(helper.Action(actionName, controllerName, routeValues)); }
public static MvcHtmlString GridLink <TGridModel>(this HtmlHelper helper, string linkText, object htmlAttributes = null) where TGridModel : class { var controllerName = HelperUtil.GetControllerName <TGridModel>(); return(helper.ActionLink(linkText, ActionNames.Grid, controllerName, null, htmlAttributes)); }
public static MvcForm BeginEditForm <TEditModel>(this HtmlHelper helper, TEditModel editModel, FormMethod method, object htmlAttributes = null) where TEditModel : class { var routeValues = ModelRouteValuesProvider.GetRouteValues(editModel); var controllerName = HelperUtil.GetControllerName(editModel); return(helper.BeginForm(ActionNames.Edit, controllerName, routeValues, method, htmlAttributes)); }
private static MvcHtmlString ActionLink <TModel>(HtmlHelper helper, string linkText, string actionName, TModel model, object routeValues, object htmlAttributes) where TModel : class { var controllerName = HelperUtil.GetControllerName(model); return(helper.ActionLink(linkText, actionName, controllerName, routeValues, htmlAttributes)); }