Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbl_slide_tra tbl_slide_tra = db.tbl_slide_tra.Find(id);

            db.tbl_slide_tra.Remove(tbl_slide_tra);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "id_slide_tra,img_slide_tra,title_slide_tra,des_slide_tra,status_slide_tra")] tbl_slide_tra tbl_slide_tra)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_slide_tra).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_slide_tra));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "id_slide_tra,img_slide_tra,title_slide_tra,des_slide_tra,status_slide_tra")] tbl_slide_tra tbl_slide_tra)
        {
            if (ModelState.IsValid)
            {
                db.tbl_slide_tra.Add(tbl_slide_tra);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbl_slide_tra));
        }
Пример #4
0
        // GET: tbl_slide_tra/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_slide_tra tbl_slide_tra = db.tbl_slide_tra.Find(id);

            if (tbl_slide_tra == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_slide_tra));
        }