Exemple #1
0
        private OUCollection GetAllParentOU(BPMConnection cn, OU ou)
        {
            OUCollection ous = new OUCollection();

            while (ou != null)
            {
                ous.Insert(0, ou);
                ou = ou.GetParentOU(cn);
            }

            OUCollection roots = cn.GetRootOUs();

            if (roots.Count > 1)
            {
                ous.Insert(0, new OU()
                {
                    IsRootOU = true,
                    Name     = "组织",
                    FullName = ""
                });
            }

            return(ous);
        }