public ActionResult Create(EstadoModels estado) { try { estado.Insert(); return RedirectToAction("Index"); } catch { return Redirect("/Error"); } }
public ActionResult Delete(EstadoModels estado) { try { estado.Delete(); return RedirectToAction("Index"); } catch { return Redirect("/Error"); } }
public ActionResult Edit(EstadoModels estado) { try { //EstadoModels estado = new EstadoModels(collection); estado.Update(); return RedirectToAction("Index"); } catch { return Redirect("/Error"); } }
// GET: Estado/Edit/5 public ActionResult Edit(int id) { ViewBag.Breadcrumb = new Breadcrumb().GetBreadcrumb(this, "Edit", id); EstadoModels estado = new EstadoModels(id); return View(estado); }
// GET: Estado/Create public ActionResult Create() { ViewBag.Breadcrumb = new Breadcrumb().GetBreadcrumb(this, "Create"); EstadoModels estado = new EstadoModels(); return View(estado); }