Пример #1
0
        public ActionResult Delete(int id = 1)
        {
            var dao    = new SlideDao();
            var result = dao.Delete(id);

            if (result)
            {
                TempData["Success"] = "Xóa Slide thành công!";
                return(RedirectToAction("Index"));
            }
            else
            {
                TempData["Success"] = "Xóa Slide thất bại!";
                return(RedirectToAction("Index"));
            }
        }
Пример #2
0
        public ActionResult Delete(int id)
        {
            var iplSlide = new SlideDao();
            var res      = iplSlide.Delete(id);

            if (res)
            {
                SetAlert("Xoa thanh cong ", "success");
                return(RedirectToAction("Index", "Slide"));
            }
            else
            {
                SetAlert("Xoa khong thanh cong", "error");
                return(RedirectToAction("Index", "Slide"));
            }
        }
Пример #3
0
 public ActionResult Delete(int id)
 {
     _slideDao.Delete(id);
     return(RedirectToAction("Index"));
 }