public ActionResult ExcluirTime(int id)
 {
     try
     {
         _repositorio = new TimeRepositorio();
         _repositorio.ExcluirTime(id);
         return(RedirectToAction("MostrarTimes"));
     }
     catch (Exception)
     {
         return(View("MostrarTimes"));
     }
 }
예제 #2
0
 //GET: Excluir time
 public ActionResult ExcluiTime(int id)
 {
     try
     {
         _repositorio = new TimeRepositorio();
         if (_repositorio.ExcluirTime(id))
         {
             ViewBag.Mensagem = "Time Excluído com sucesso!!!";
         }
         return(RedirectToAction("ObterTimes"));
     }
     catch (Exception)
     {
         return(RedirectToAction("ObterTimes"));
     }
 }