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