private void DoLogin() { var eventDelegate = LoginHandler; var newView = new AccountDetailsView(new AccountDetailsViewModel()); eventDelegate?.Invoke(newView, null); }
public ActionResult Index() { IDictionary <string, string> crumbs = GetBreadCrumbs("details", UrlService.UserUrl("account")); string password = _cryptographyService.Decrypt(Owner.Password); AccountDetailsView view = ModelFactory <AccountDetailsView>(new { password, Confirm = password }); view.Populate(Owner); return(View(view, crumbs)); }
public ActionResult Index(string username, AccountDetailsView detailsView) { IDictionary <string, string> crumbs = GetBreadCrumbs("details", UrlService.UserUrl("account")); if (ModelState.IsValid) { detailsView.Password = _cryptographyService.Encrypt(detailsView.Password); Domain.Model.User savedUser = detailsView.GetUser(); savedUser.Settings = Owner.Settings; savedUser.Id = Owner.Id; _userRepository.Save(savedUser); detailsView.UIMessage = "Account details saved."; detailsView.Password = _cryptographyService.Decrypt(savedUser.Password); detailsView = SetAuthorizationAndUrlService(detailsView); detailsView.Authorization.Owner = savedUser; } else { ValidationHelper.ValidationHackRemoveNameAndBlankKey(ModelState); } return(View(detailsView, crumbs)); }
public AccountDetailsView() { Instance = this; }