Exemplo n.º 1
0
        public ActionResult DeleteMenu()
        {
            string json = Request["data"];

            if (string.IsNullOrWhiteSpace(json))
            {
                throw new BusinessException("请选择要删除的菜单");
            }
            int sysno = 0;

            int.TryParse(json, out sysno);
            if (sysno == 0)
            {
                throw new BusinessException("传入的菜单编号不是有效编号");
            }
            menu_service.DeleteSysMenu(sysno);
            return(Json(new AjaxResult {
                Success = true, Data = "删除成功"
            }, JsonRequestBehavior.AllowGet));
        }