public ActionResult Index(int amount)
 {
     amount = 5 <= amount && amount <= 50 ? amount : 5;
     _userRepository.UpdateBalance(amount, User.UserId);
     var settingsViewModel = new SettingsViewModel
         {
             Message = "Balance updated",
             Success = true
         };
     TempData["ViewModel"] = settingsViewModel;
     return RedirectToAction("Index");
 }
 public ActionResult Index(string forename, string surname)
 {
     User.Forename = forename;
     User.Surname = surname;
     _userRepository.UpdateUser(User);
     _authenticationHelper.SetFormsAuthenticationCookie(Response, User.Email);
     var settingsViewModel = new SettingsViewModel
         {
             Message = "Details updated",
             Success = true
         };
     return View(settingsViewModel);
 }
 public ActionResult Index(string password, string confirmPassword)
 {
     var settingsViewModel = new SettingsViewModel();
     if (password == confirmPassword)
     {
         var passwordHash = PasswordHash.CreateHash(password);
         _userRepository.UpdatePassword(User.UserId, passwordHash);
         settingsViewModel.Message = "Password updated";
         settingsViewModel.Success = true;
     }
     else
     {
         settingsViewModel.Message = "Passwords must match";
     }
     return View(settingsViewModel);
 }
 public ActionResult Index()
 {
     var settingsViewModel = new SettingsViewModel();
     return View(settingsViewModel);
 }