Esempio n. 1
0
        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"));
        }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        // 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));
        }