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")); }
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)); }
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)); }
// 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)); }