예제 #1
0
        public ActionResult DisposableLoadMenus()
        {
            var id     = Request["id"];
            int parent = 0;

            int.TryParse(id, out parent);

            var result = menu_service.DisposableLoadMenus(parent);

            return(Json(
                       from s in result
                       select new
            {
                id = s.SysNo,
                text = s.MenuName,
                parent = s.ParentSysNo == 0 ? "#" : s.ParentSysNo.ToString(),
                data = s
            }
                       , JsonRequestBehavior.AllowGet));
        }