public ActionResult Create(Medico medico)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(View());
         }
         medico.AddMedico(medico);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Пример #2
0
 public ActionResult CriarMedico(Medico medico)
 {
     if (!Request.IsAuthenticated)
     {
         return(RedirectToAction("Login", "Account"));
     }
     try
     {
         if (!ModelState.IsValid)
         {
             return(View());
         }
         medico.AddMedico(medico);
         return(RedirectToAction("Medicos"));
     }
     catch
     {
         return(View());
     }
 }