public ActionResult UpgradeVolunteerToAdministrator(UpgradeVolunteerRoleViewModel model) { // Get username by selected uerId. //var user = if (ModelState.IsValid) { Roles.AddUserToRole(model.UserId, Constants.RoleAdmin); return RedirectToAction("Index", "Home"); } // If we got this far, something failed, redisplay form return View(model); }
public ActionResult UpgradeVolunteerToAdministrator(UpgradeVolunteerRoleViewModel model) { if (ModelState.IsValid) { _webSecurity.AddUserToRole(model.UserId, Constants.RoleAdmin); return RedirectToAction("Index", "Home"); } // If we got this far, something failed, redisplay form return View(model); }