public ActionResult Display(int id) { Chofer chofer = AdminChofer.GetChofer(id); if (chofer != null) { return(View("Display", chofer)); } return(HttpNotFound()); }
public ActionResult Update(Chofer chofer) { if (!ModelState.IsValid) { return(View("Update", chofer)); } else { AdminChofer.Update(chofer); return(RedirectToAction("Index")); } }
public ActionResult Create(Auto auto) { auto.Chofer = AdminChofer.GetChofer(auto.Chofer.ChoferID); if (!ModelState.IsValid) { return(View("Create", auto)); } else { AdminAuto.Create(auto); return(RedirectToAction("Index")); } }
public ActionResult Update(int id) { Chofer c = AdminChofer.GetChofer(id); return(View("Update", c)); }
public ActionResult _ChoferDropdown() { List <Chofer> choferes = AdminChofer.GetChoferes(); return(PartialView("_ChoferList", choferes)); }
public ActionResult _ChoferList(int number = 0) { List <Chofer> choferes = AdminChofer.GetChoferes(); return(PartialView("_ChoferList", choferes)); }
// GET: Chofer public ActionResult Index() { List <Chofer> choferes = AdminChofer.GetChoferes(); return(View(choferes)); }
public ActionResult DeleteConfirmed(int id) { AdminChofer.Delete(id); return(RedirectToAction("Index")); }