Beispiel #1
0
        public ActionResult Delete(int Id)
        {
            Book.BLL.T_Base_Admin bll = new BLL.T_Base_Admin();
            int result = bll.Delete(Id);

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public JsonResult DeleteJson(int Id)
        {
            Book.BLL.T_Base_Admin bll = new BLL.T_Base_Admin();
            int result = bll.Delete(Id);

            Book.Model.Message msg;
            if (result > 0)
            {
                msg = new Book.Model.Message()
                {
                    Code = 200, Content = "删除成功"
                };
            }
            else
            {
                msg = new Book.Model.Message()
                {
                    Code = 500, Content = "删除失败"
                };
            }
            return(Json(msg));
        }