Exemplo n.º 1
0
 internal SortableThBuilder(HtmlHelper html, SortablePagedList <TModel> paged, string action, RouteValueDictionary route)
 {
     _html    = html;
     _orderBy = paged.OrderBy;
     _asc     = paged.Asc;
     _action  = action;
     _route   = route;
 }
Exemplo n.º 2
0
        internal AjaxUpdateBuilder(HtmlHelper html, SortablePagedList <TModel> paged, string action, RouteValueDictionary route, string updateTarget, string onSuccess)
            : base(html, paged, action, route)
        {
            if (updateTarget == null)
            {
                // nameof
                throw new ArgumentNullException("updateTarget");
            }

            _updateTarget = updateTarget;

            _ajaxAttr = new Dictionary <string, object>()
            {
                { "data-ajax-update", _updateTarget },
                { "data-ajax-mode", "replace" },
                { "data-ajax", "true" },
                { "data-ajax-method", "POST" }
            };

            _paged            = paged;
            OnSuccessCallback = onSuccess;
        }