// Token: 0x0600189D RID: 6301 RVA: 0x00054D3C File Offset: 0x00052F3C
 private void GetManagementChain(IADOrgPerson orgPerson, out Persona[] management, out Persona manager)
 {
     object[][] managementChainView = orgPerson.GetManagementChainView(false, GetPersonaOrganizationHierarchyCommand.propertiesToFetch);
     this.WriteTrace("managementChain.Count={0}", new object[]
     {
         (managementChainView == null) ? "0" : managementChainView.Length.ToString()
     });
     management = null;
     manager    = null;
     if (managementChainView != null && managementChainView.Length > 1)
     {
         manager = this.GetPersonaFromADObject(managementChainView[managementChainView.Length - 2]);
         this.WriteTrace("Manager name={0} / Manager ID={1}", new object[]
         {
             manager.DisplayName,
             manager.ADObjectId.ToString()
         });
         if (managementChainView.Length > 2)
         {
             management = new Persona[managementChainView.Length - 2];
             for (int i = 0; i < managementChainView.Length - 2; i++)
             {
                 management[i] = this.GetPersonaFromADObject(managementChainView[i]);
                 this.WriteTrace("Manager name={0} / Manager ID=", new object[]
                 {
                     management[i].DisplayName,
                     management[i].ADObjectId.ToString()
                 });
             }
         }
     }
 }
示例#2
0
        // Token: 0x06002A99 RID: 10905 RVA: 0x000EEF08 File Offset: 0x000ED108
        internal static void RenderOrganizationContents(TextWriter writer, UserContext userContext, IADOrgPerson orgPerson, IRecipientSession adRecipientSession)
        {
            object[][] managementChainView = orgPerson.GetManagementChainView(false, new PropertyDefinition[]
            {
                ADObjectSchema.Id,
                ADRecipientSchema.DisplayName,
                ADOrgPersonSchema.Title
            });
            if (managementChainView != null)
            {
                ReadADOrgPerson.RenderManagerList(writer, userContext, managementChainView);
            }
            ADRecipient adrecipient = null;

            if (orgPerson.Manager != null)
            {
                try
                {
                    adrecipient = adRecipientSession.Read(orgPerson.Manager);
                }
                catch (NonUniqueRecipientException ex)
                {
                    ExTraceGlobals.DirectoryTracer.TraceDebug <string>(0L, "ReadADOrgPerson.RenderOrganizationContents: NonUniqueRecipientException thrown by IRecipientSession.Read: {0}", ex.Message);
                }
            }
            if (adrecipient != null)
            {
                IADOrgPerson iadorgPerson      = (IADOrgPerson)adrecipient;
                object[][]   directReportsView = iadorgPerson.GetDirectReportsView(new PropertyDefinition[]
                {
                    ADObjectSchema.Id,
                    ADRecipientSchema.DisplayName,
                    ADOrgPersonSchema.Title
                });
                if (directReportsView != null)
                {
                    ReadADOrgPerson.RenderPeersList(writer, directReportsView, orgPerson.Id, orgPerson.DisplayName, orgPerson.Title);
                }
            }
            else
            {
                ReadADOrgPerson.RenderPeopleLabelHeading(writer, LocalizedStrings.GetHtmlEncoded(1804838102));
                ReadADOrgPerson.RenderSelf(writer, orgPerson.Id, orgPerson.DisplayName, orgPerson.Title);
            }
            object[][] directReportsView2 = orgPerson.GetDirectReportsView(new PropertyDefinition[]
            {
                ADObjectSchema.Id,
                ADRecipientSchema.DisplayName,
                ADOrgPersonSchema.Title
            });
            if (directReportsView2 != null)
            {
                ReadADOrgPerson.RenderDirectReportsList(writer, directReportsView2);
            }
        }
示例#3
0
        private void RenderManagementChain(IADOrgPerson person, TextWriter writer)
        {
            this.managersResults = person.GetManagementChainView(false, new PropertyDefinition[]
            {
                ADRecipientSchema.DisplayName,
                ADObjectSchema.Id,
                ADRecipientSchema.RecipientType
            });
            if (this.managersResults.Length <= 1)
            {
                return;
            }
            int num          = this.managersResults.Length - 1;
            int num2         = 0;
            int readItemType = 1;

            if (num > 25)
            {
                num2 = num - 25;
            }
            writer.Write("<tr><td class=\"lbl lp\">");
            writer.Write(LocalizedStrings.GetHtmlEncoded(1660340599));
            writer.Write("</td><td>");
            writer.Write("<table cellpadding=0 cellspacing=0 class=\"drpts\">");
            for (int i = num2; i < num; i++)
            {
                writer.Write("<tr>");
                if (i != 0)
                {
                    writer.Write("<td><img alt=\"\" class=\"mitimg\" src=\"");
                    base.UserContext.RenderThemeFileUrl(writer, ThemeFileId.OrganizationUpArrow);
                    writer.Write("\"></td>");
                    writer.Write("<td class=\"mitdpd\">");
                }
                else
                {
                    writer.Write("<td colspan=\"2\" class=\"rptdpd\">");
                }
                ReadADRecipient.RenderADRecipient(writer, readItemType, this.managersResults[i][1] as ADObjectId, this.managersResults[i][0].ToString());
                writer.Write("</td></tr>");
            }
            writer.Write("</table>");
            writer.Write("</td></tr>");
            writer.Write("<tr><td class=\"spcHd\" colspan=2></td></tr>");
            this.renderOrganizationDetails = true;
        }