public ActionResult DeleteConfirmed(int id) { Aros aros = db.Aros.Find(id); aros.Ativo = (OpcaoStatusAros)1; db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Medida,Ativo")] Aros aros) { if (ModelState.IsValid) { db.Entry(aros).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aros)); }
public ActionResult Create([Bind(Include = "Id,Medida,Ativo")] Aros aros) { if (ModelState.IsValid) { db.Aros.Add(aros); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aros)); }
// GET: Aros/Delete public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Aros aros = db.Aros.Find(id); if (aros == null) { return(HttpNotFound()); } return(View(aros)); }