public ActionResult Delete(int id, FormCollection collection)
        {
            if (id > 0 && ModelState.IsValid)
            {
                Cdao.DeleteConductor(id);
                return(RedirectToAction("Index"));
            }

            else
            {
                return(View());
            }
        }
Ejemplo n.º 2
0
 public ActionResult DeleteConductor(int id, FormCollection collection)
 {
     try
     {
         if (conductorDAO.DeleteConductor(id))
         {
             return(RedirectToAction("IndexH"));
         }
         else
         {
             return(View("ErrorConductor"));
         }
     }
     catch
     {
         return(View("ErrorConductor"));
     }
 }