Пример #1
0
        public ConfirmableLink ConfirmedByPopover(string actionName, string controllerName, object routeValues, string title, string message)
        {
            confirmInfo = new ConfirmInfo(title, message);

            var parameters = Util.EncryptRouteValues(routeValues);
            RouteValueDictionary routeData = new RouteValueDictionary();

            routeData.Add(ConfirmInfo.ActionNameKey, actionName);
            routeData.Add(ConfirmInfo.ControllerNameKey, controllerName ?? helper.ViewContext.RouteData.Values["controller"]);
            routeData.Add(ConfirmInfo.QueryStringKey, parameters["q"]);

            confirmInfo.Url = StringEncrypter.UrlEncrypter.Encrypt(routeData.ToQueryString().ToString());

            return(this);
        }
Пример #2
0
        public static MvcHtmlString PopoverConfirmLink(this AjaxHelper helper, string innerHtml, string actionName, object routeValues, AjaxOptions ajaxOptions, object htmlAttributes, ConfirmInfo confirmInfo, params string[] permissionCodes)
        {
            RouteValueDictionary parameters = HtmlHelper.AnonymousObjectToHtmlAttributes(routeValues);
            RouteValueDictionary attributes = HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes);


            ajaxOptions.ToUnobtrusiveHtmlAttributes();
            //confirmInfo.PopulateAjaxOptions(ajaxOptions);
            //confirmInfo.PopulateParameters(parameters);

            HtmlHelper htmlHelper = new HtmlHelper(helper.ViewContext, helper.ViewDataContainer, helper.RouteCollection);

            return(htmlHelper.Link(innerHtml, actionName, null, parameters, attributes, permissionCodes));
        }
Пример #3
0
 public static MvcHtmlString PopoverConfirmLink(this AjaxHelper helper, string innerHtml, string actionName, string controllerName, object routeValues, object htmlAttributes, AjaxOptions ajaxOptions, ConfirmInfo confirmInfo, params string[] permissionCodes)
 {
     return(null);
 }