Exemplo n.º 1
0
        public static TreeMode CreateRole(RoleInfo node)
        {
            TreeMode treeNode = new TreeMode
            {
                id   = node.RoleId,
                text = node.RoleName
            };

            if (node.ListRoleSub != null)
            {
                foreach (var item in node.ListRoleSub)
                {
                    treeNode.children.Add(TreeMode.CreateRole(item));
                }
            }
            return(treeNode);
        }
Exemplo n.º 2
0
        public static TreeMode CreateDepartment(DeptInfo node)
        {
            TreeMode treeNode = new TreeMode
            {
                id   = node.Businessdivisionid,
                text = node.Businessdivisionname,
                code = node.Businessdivisioncode
            };

            if (node.ListDepartmentSub != null)
            {
                foreach (var item in node.ListDepartmentSub)
                {
                    treeNode.children.Add(TreeMode.CreateDepartment(item));
                }
            }
            return(treeNode);
        }
Exemplo n.º 3
0
        public static TreeMode CreateMenu(MenuInfo node)
        {
            TreeMode treeNode = new TreeMode
            {
                id   = node.MenuId,
                text = node.MenuName,
                icon = node.MenuIcon,
                url  = node.MenuUrl
            };

            if (node.MenuListSub != null)
            {
                foreach (var item in node.MenuListSub)
                {
                    treeNode.children.Add(TreeMode.CreateMenu(item));
                }
            }
            return(treeNode);
        }