Пример #1
0
        private void vulLstUsersNiet()
        {
            lstUsersNiet.Items.Clear();
            List <DirectoryEntry> usersAll     = Stats.GetAllUsers();
            List <string>         usersMembers = GroupMemberShip.MemberUsers(group.Name);

            foreach (DirectoryEntry de in usersAll)
            {
                string waarde = Helper.HandleNull(de.Properties["SAMAccountName"][0]);
                if (waarde != "")
                {
                    bool gevonden = false;
                    foreach (string user in usersMembers)
                    {
                        if (user == waarde)
                        {
                            gevonden = true;
                            break;
                        }
                    }
                    if (!gevonden)
                    {
                        lstUsersNiet.Items.Add(waarde);
                    }
                }
            }
        }
Пример #2
0
        private void vulLstUsersWel()
        {
            List <string> users = GroupMemberShip.MemberUsers(group.Name);

            foreach (string user in users)
            {
                lstUsersWel.Items.Add(user);
            }
        }