public ActionResult Create(gesc_professor gesc_professor) { if (ModelState.IsValid) { appUsuario.Salvar(gesc_professor); ExibeMensagem('S', 1); return(RedirectToAction("Index")); } return(View(gesc_professor)); }
public ActionResult Editar(Professor prof) { if (ModelState.IsValid) { var appProf = new ProfessorAplicacao(); appProf.Salvar(prof); return(RedirectToAction("Visualizar")); } return(View(prof)); }
public ActionResult Cadastrar(Professor prof) { if (ModelState.IsValid) { var appProf = new ProfessorAplicacao(); appProf.Salvar(prof); Roles.AddUserToRole(prof.login, "professor"); return(RedirectToAction("Visualizar")); } return(View(prof)); }