Esempio n. 1
0
 public ActionResult Create(EstadoModels estado)
 {
     try
     {
         estado.Insert();
         return RedirectToAction("Index");
     }
     catch
     {
         return Redirect("/Error");
     }
 }
Esempio n. 2
0
 public ActionResult Delete(EstadoModels estado)
 {
     try
     {
         estado.Delete();
         return RedirectToAction("Index");
     }
     catch
     {
         return Redirect("/Error");
     }
 }
Esempio n. 3
0
 public ActionResult Edit(EstadoModels estado)
 {
     try
     {
         //EstadoModels estado = new EstadoModels(collection);
         estado.Update();
         return RedirectToAction("Index");
     }
     catch
     {
         return Redirect("/Error");
     }
 }
Esempio n. 4
0
 // 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);
 }
Esempio n. 5
0
 // GET: Estado/Create
 public ActionResult Create()
 {
     ViewBag.Breadcrumb = new Breadcrumb().GetBreadcrumb(this, "Create");
     EstadoModels estado = new EstadoModels();
     return View(estado);
 }