Exemplo n.º 1
0
        public static string ParentOrgGroupIDString(int OrgGroupID)
        {
            string   OrgGroupIDString = OrgGroupID.ToString();
            OrgGroup grp      = new OrgGroup(OrgGroupID);
            int      ParentID = grp.ParentID;
            bool     Inherit  = grp.Inherit;

            while (ParentID != 0 && Inherit == true)
            {
                OrgGroupIDString = ParentID + "|" + OrgGroupIDString;
                OrgGroup newgrp = new OrgGroup(ParentID);
                ParentID = newgrp.ParentID;
                Inherit  = newgrp.Inherit;
            }
            return(OrgGroupIDString);
        }
Exemplo n.º 2
0
        public static string[] ParentOrgGroupIDCollection(int OrgGroupID)
        {
            string   OrgGroupIDString = OrgGroupID.ToString();
            OrgGroup grp      = new OrgGroup(OrgGroupID);
            int      ParentID = grp.ParentID;
            bool     Inherit  = grp.Inherit;

            while (ParentID != 0 && Inherit == true)
            {
                OrgGroupIDString = ParentID + "|" + OrgGroupIDString;
                OrgGroup newgrp = new OrgGroup(ParentID);
                ParentID = newgrp.ParentID;
                Inherit  = newgrp.Inherit;
            }
            string[] OrgGroupIDCollection = OrgGroupIDString.Split('|');
            return(OrgGroupIDCollection);
        }