Exemplo n.º 1
0
        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"));
        }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
        // 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));
        }
Exemplo n.º 4
0
        // 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));
        }
Exemplo n.º 5
0
 public void AddTotbl_page(tbl_page tbl_page)
 {
     base.AddObject("tbl_page", tbl_page);
 }
Exemplo n.º 6
0
 public static tbl_page Createtbl_page(int id)
 {
     tbl_page tbl_page = new tbl_page();
     tbl_page.ID = id;
     return tbl_page;
 }