Example #1
0
        private void GetChild(string OrgCode, List <JsonTreeNode> parentNodes)
        {
            var glist = sysManageService.GetChildOrgsByParentCode(OrgCode);

            if (glist != null)
            {
                foreach (var item in glist)
                {
                    JsonTreeNode gnode = new JsonTreeNode();
                    gnode.id          = item.OrgCode;
                    gnode.text        = item.OrgName;
                    gnode.value       = "1";
                    gnode.hasChildren = true;

                    gnode.classes = "group";
                    parentNodes.Add(gnode);
                }
            }
            var ulist = sysManageService.GetUserListByOrgCode(OrgCode);

            if (ulist != null)
            {
                foreach (var user in ulist)
                {
                    JsonTreeNode unode = new JsonTreeNode();
                    unode.id          = user.UserUID;
                    unode.text        = user.FullName;
                    unode.value       = "2";
                    unode.showcheck   = true;
                    unode.hasChildren = false;
                    unode.classes     = "user";
                    parentNodes.Add(unode);
                }
            }
        }