public ActionResult DeleteConfirmed(int id) { tbl_page tbl_page = db.tbl_page.Find(id); db.tbl_page.Remove(tbl_page); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,name,content,admin_id")] tbl_page tbl_page) { if (ModelState.IsValid) { db.Entry(tbl_page).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.admin_id = new SelectList(db.tbl_admin, "Id", "first_name", tbl_page.admin_id); return(View(tbl_page)); }
// GET: page/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_page tbl_page = db.tbl_page.Find(id); if (tbl_page == null) { return(HttpNotFound()); } return(View(tbl_page)); }
// GET: page/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_page tbl_page = db.tbl_page.Find(id); if (tbl_page == null) { return(HttpNotFound()); } ViewBag.admin_id = new SelectList(db.tbl_admin, "Id", "first_name", tbl_page.admin_id); return(View(tbl_page)); }
public void AddTotbl_page(tbl_page tbl_page) { base.AddObject("tbl_page", tbl_page); }
public static tbl_page Createtbl_page(int id) { tbl_page tbl_page = new tbl_page(); tbl_page.ID = id; return tbl_page; }