// // GET: /Account/LogOn /// <summary> /// Initializes data that might not be available when the constructor is called. /// </summary> /// <param name="requestContext">The HTTP context and route data.</param> protected override void Initialize(RequestContext requestContext) { base.Initialize(requestContext); //Url = new UrlHelperWrapper(base.Url); if (Url == null) { Url = new UrlHelperWrapper(requestContext); } }
public static string BuildUrl(int pageNumber, QueryUrl queryUrl, IUrlHelperWrapper urlHelper) { RouteValueDictionary routeValueDictionary = queryUrl.AddQueriesToUrl( new Dictionary <string, string> { { "Page", pageNumber.ToString() } }); return(urlHelper.RouteUrl(routeValueDictionary)); }
/// <summary> /// Initializes a new instance of the <see cref="AccountController"/> class. /// </summary> //public AccountController() // : this(new MembershipWrapper(), new FormsAuthenticationWrapper(), null) //{ //} /// <summary> /// Initializes a new instance of the <see cref="AccountController"/> class. /// </summary> /// <param name="membershipObject">The membership object.</param> /// <param name="formsAuthenticationObject">The forms authentication object.</param> /// <param name="urlHelper">The URL helper.</param> public AccountController(IMembershipWrapper membershipObject, IFormsAuthenticationWrapper formsAuthenticationObject, IUrlHelperWrapper urlHelper, IUserProfileService userProfileService, IForgetPasswordRequestService forgetPasswordRequestService, ISettingService settingService) { this.membership = membershipObject; this.Url = urlHelper; this.authentication = formsAuthenticationObject; this._forgetPasswordRequestService = forgetPasswordRequestService; this._settingService = settingService; this._userProfileService = userProfileService; }
// // GET: /Account/LogOn /// <summary> /// Initializes data that might not be available when the constructor is called. /// </summary> /// <param name="requestContext">The HTTP context and route data.</param> protected override void Initialize(RequestContext requestContext) { base.Initialize(requestContext); //Url = new UrlHelperWrapper(base.Url); if (Url == null) Url = new UrlHelperWrapper(requestContext); }
public static string BuildPageSizeUrl(int defaultPageSize, int maxItemsPerPage, int totalItems, QueryUrl queryUrl, IUrlHelperWrapper urlHelper) { var pageSize = GetOtherPageSizeByCurrentPageSize(maxItemsPerPage, totalItems, defaultPageSize); RouteValueDictionary routeValueDictionary = queryUrl.AddQueriesToUrl( new Dictionary <string, string> { { "pageSize", pageSize.ToString() }, { "page", 1.ToString() } }); return(urlHelper.RouteUrl(routeValueDictionary)); }