示例#1
0
        public ActionResult Create(gesc_professor gesc_professor)
        {
            if (ModelState.IsValid)
            {
                appUsuario.Salvar(gesc_professor);
                ExibeMensagem('S', 1);

                return(RedirectToAction("Index"));
            }

            return(View(gesc_professor));
        }
示例#2
0
 public ActionResult Editar(Professor prof)
 {
     if (ModelState.IsValid)
     {
         var appProf = new ProfessorAplicacao();
         appProf.Salvar(prof);
         return(RedirectToAction("Visualizar"));
     }
     return(View(prof));
 }
示例#3
0
 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));
 }