public ActionResult Delete(int id)
        {
            var temp = mb.Delete(id);

            if (temp == true)
            {
                return(Content("<script>alert('删除成功!');window.open('" + Url.Action("List", "Music") + "','_self');</script>"));
            }
            else
            {
                return(View());
            }
        }
Exemple #2
0
        public ActionResult Delete(int id)
        {
            var info = MusicBLL.GetList(p => p.ID == id).FirstOrDefault();

            if (null == info)
            {
                return(Json(new APIJson(-1, "删除失败,参数有误")));
            }
            if (MusicBLL.Delete(info))
            {
                return(Json(new APIJson(0, "删除成功")));
            }
            return(Json(new APIJson(-1, "删除失败,请重试")));
        }