// GET: Placement/Details/5 public ActionResult Details(int?id) { if (id == null) { return(NotFound()); } var choice = placement.GetPlacement(id); return(View(choice)); }
public async Task <IActionResult> Register(RegisterViewModel model) { if (ModelState.IsValid) { //model.ReturnUrl = returnUrl ?? Url.Content("~/"); var user = new User { UserName = model.FirstName, FirstName = model.FirstName, LastName = model.LastName, StateOfOrigin = model.StateOfOrigin, JobRole = job.GetJob(model.JobRoleId), Placement = placement.GetPlacement(model.PlacementId), status = statuss.GetStatus(model.StatusId) }; var result = await userManager.CreateAsync(user, model.Password); if (result.Succeeded) { await signInManager.SignInAsync(user, false); return(RedirectToAction("Index", "Home")); } var error = result.Errors; return(View(error.ToList())); } RegisterViewModel rmodel = new RegisterViewModel(); rmodel.Placements = placement.GetPlacements(); rmodel.JobRole = job.GetJobs(); rmodel.Statuses = statuss.GetStatuses(); return(View(rmodel)); }