public IActionResult SignUp(string email, string passAgain, string pass, string btn, int Colaborador) { if (passAgain != pass) { ViewData["SEA"] = true; return(View()); } if (btn == "1") { if (Colaborador == 0) { ViewData["result"] = "O colaborador deve ser selecionado."; return(View()); } ColaboradorBLL bllcolab = new ColaboradorBLL(); UsuarioBLL bll = new UsuarioBLL(); Usuario usuario = new Usuario(); usuario.Login = email; usuario.Senha = pass; usuario.Colaborador = bllcolab.GetById(Colaborador); TempData["result"] = bll.Insert(usuario); return(RedirectToAction("Index", "Home")); } else { return(View()); } }