Beispiel #1
0
        public ActionResult Index(ProfilePage currentPage)
        {
            var currentUser = EPiServerProfile.Current;
            var viewModel   = new ProfilePageViewModel(currentPage)
            {
                CurrentUser       = currentUser,
                ResetPasswordPage = UrlResolver.Current.GetUrl(_settingsService.GetSiteSettings <ReferencePageSettings>()?.ResetPasswordPage ?? ContentReference.StartPage)
            };

            return(View(viewModel));
        }
        public ActionResult Index(ProfilePage currentPage)
        {
            var viewModel = new ProfilePageViewModel(currentPage)
            {
                Orders              = GetOrderHistoryViewModels(),
                Addresses           = GetAddressViewModels(),
                SiteUser            = CustomerService.GetSiteUser(User.Identity.Name),
                CustomerContact     = new Commerce.Customer.FoundationContact(CustomerService.GetCurrentContact().Contact),
                OrderDetailsPageUrl = UrlResolver.Current.GetUrl(_settingsService.GetSiteSettings <ReferencePageSettings>()?.OrderDetailsPage ?? ContentReference.StartPage),
                ResetPasswordPage   = UrlResolver.Current.GetUrl(_settingsService.GetSiteSettings <ReferencePageSettings>()?.ResetPasswordPage ?? ContentReference.StartPage),
                AddressBookPage     = UrlResolver.Current.GetUrl(_settingsService.GetSiteSettings <ReferencePageSettings>()?.AddressBookPage ?? ContentReference.StartPage)
            };

            return(View(viewModel));
        }