public ActionResult DeleteConfirmed(int id) { StatusOcorrenciaPB statusOcorrenciaPB = db.StatusOcorrenciaPBs.Find(id); db.StatusOcorrenciaPBs.Remove(statusOcorrenciaPB); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "StatusOcorrenciaPBId,Status,Observacao")] StatusOcorrenciaPB statusOcorrenciaPB) { if (ModelState.IsValid) { db.Entry(statusOcorrenciaPB).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(statusOcorrenciaPB)); }
public ActionResult Create([Bind(Include = "StatusOcorrenciaPBId,Status,Observacao")] StatusOcorrenciaPB statusOcorrenciaPB) { if (ModelState.IsValid) { db.StatusOcorrenciaPBs.Add(statusOcorrenciaPB); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(statusOcorrenciaPB)); }
// GET: StatusOcorrenciaPB/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } StatusOcorrenciaPB statusOcorrenciaPB = db.StatusOcorrenciaPBs.Find(id); if (statusOcorrenciaPB == null) { return(HttpNotFound()); } return(View(statusOcorrenciaPB)); }