예제 #1
0
        //删除菜单
        public ActionResult <Message> DeleteModule()
        {
            string[] idsStr = Request.Form["ids"];

            var msg    = new Message(10, "删除失败");
            var idsInt = new List <int>();

            if (idsStr != null && idsStr.Count() > 0)
            {
                foreach (var id in idsStr)
                {
                    if (Validator.IsNumbers(id))
                    {
                        idsInt.Add(int.Parse(id));
                    }
                }

                msg = CMSAdminBO.DeleteModule(idsInt);
            }
            else
            {
                msg.Code = 101;
                msg.Msg  = "请选择要删除的菜单";
            }

            return(new JsonResult(msg));
        }