public static OU[] GetOUs(OU pou) { ArrayList ReturnValue = new ArrayList(); pou.DirectoryEntry.Children.SchemaFilter.Add("organizationalUnit"); foreach (DirectoryEntry de in pou.DirectoryEntry.Children) { ReturnValue.Add(new OU(de.Name.Replace("OU=", ""), de)); } return((OU[])ReturnValue.ToArray(typeof(OU))); }
public OUViewModel(OU ou, TreeViewMVItem parentItem) : base(parentItem, true) { _ou = ou; }