public ActionResult Delete(int id, FormCollection collection) { if (id > 0 && ModelState.IsValid) { Cdao.DeleteConductor(id); return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult DeleteConductor(int id, FormCollection collection) { try { if (conductorDAO.DeleteConductor(id)) { return(RedirectToAction("IndexH")); } else { return(View("ErrorConductor")); } } catch { return(View("ErrorConductor")); } }