Beispiel #1
0
        public JsonResult UserRoleTreeList()
        {
            var AllList     = UserMenuDBOperate.GetAllList();
            var ConventList = AllList.ConvertAll(a => new ZTreeModel()
            {
                id   = a.Id,
                name = a.Name,
                pId  = a.PID ?? 0,
            });

            return(Json(ConventList));
        }
Beispiel #2
0
        public JsonResult UserManagerList()
        {
            var AllList = UserMenuDBOperate.GetAllList();
            var pList   = AllList.Where(a => a.PID == 0).ToList();

            foreach (var item in pList)
            {
                var chlidList = AllList.Where(a => a.PID == item.Id).ToList();
                item.ChildList = chlidList;
            }

            return(Json(pList));
        }