public ActionResult Edit(int id) { if (id > 0) { return(View(DispatchDAO.GetDispatchByID(id))); } else { return(RedirectToAction("Index")); } }
// // GET: /Dispatch/Details/5 public ActionResult Details(int id) { DispatchModel dispatch = DispatchDAO.GetDispatchByID(id); if (dispatch != null) { return(View(dispatch)); } else { return(RedirectToAction("index")); } }