Quantcast
Channel: ÇözümPark Forum - Güncel Konular
Viewing all articles
Browse latest Browse all 6793

ExchangeService Api ile odaları dinlerken Subject gelmiyor

$
0
0

Merhaba Arkadaşlar 

ExchangeService Api Üzerinden Odaları dinliyorum lakin Start Date End Date Oluşturan Kişi geliyor ben Subject kısmının gelmesini ve gerekirse detay kısmınında gelmesini istiyorum Lakin Subject Kısmıda randevuyu oluşturan kişinin adı geliyor Subject yazdığım gelmiyor bu konu hakkında nasıl yardımcı olabilirsiniz.

 

Resim olarak Ekleme yaptım.

Yazdığım kod aşağıdaki şekildedir.

 ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
            service.Credentials = new NetworkCredential("mail", "Sifre", "Domain");
            service.AutodiscoverUrl("mail");

            string filter = "(&(objectClass=*)(msExchRecipientDisplayType=7))".Trim();
            DirectorySearcher search = new DirectorySearcher(filter);
            List<AttendeeInfo> rooms = new List<AttendeeInfo>();

            foreach (SearchResult result in search.FindAll())
            {

                ResultPropertyCollection r = result.Properties;
                DirectoryEntry entry = result.GetDirectoryEntry();
                rooms.Add(new AttendeeInfo(entry.Properties.Value.ToString().Trim()));
            }
            List<AttendeeInfo> attendees = rooms;

            List<AttendeeInfo> attend = new List<AttendeeInfo>();
            int i = 0;
            foreach (AttendeeInfo inf in attendees)
            {
                attend.Clear();
                attend.Add(inf.SmtpAddress);

                AvailabilityOptions options = new AvailabilityOptions();
                options.MaximumSuggestionsPerDay = 48;
                GetUserAvailabilityResults results = service.GetUserAvailability(attend, new TimeWindow(DateTime.Now.AddDays(-1), DateTime.Now.AddDays(2)), AvailabilityData.FreeBusy, options);

                foreach (AttendeeAvailability
                attendeeAvailability in results.AttendeesAvailability)
                {
                    listBox1.Items.Add("===========================================================================");
                    listBox1.Items.Add("Oda " + attendees.SmtpAddress + "Yoğun saatleri");
                    if (attendeeAvailability.ErrorCode == ServiceError.NoError)
                    {
                        foreach (Microsoft.Exchange.WebServices.Data.CalendarEvent calendarEvent in
                        attendeeAvailability.CalendarEvents)
                        {
                            listBox1.Items.Add("Takvim etkinliği");

                            listBox1.Items.Add(" Başlangıç saati: " + calendarEvent.StartTime.ToString());

                            listBox1.Items.Add(" Bitiş zamanı: " + calendarEvent.EndTime.ToString());
                            if (calendarEvent.Details != null)
                            {

                                listBox1.Items.Add(" Konu, özne:" + calendarEvent.Details.Subject);

                            }

                        }
                    }
                }


                listBox1.Items.Add("Öneriler:");

                listBox1.Items.Add("");

                //foreach (Microsoft.Exchange.WebServices.Data.Suggestion suggestion in results.Suggestions)
                //{
                //    listBox1.Items.Add("Önerilen gün: " + suggestion.Date.ToString());

                //    listBox1.Items.Add("Önerilen günün genel kalitesi: " + suggestion.Quality.ToString());

                //    foreach (TimeSuggestion timeSuggestion in suggestion.TimeSuggestions)
                //    {
                //        listBox1.Items.Add(" Önerilen zaman: " + timeSuggestion.MeetingTime.ToString());

                //        listBox1.Items.Add(" Önerilen zaman kalitesi: " + timeSuggestion.Quality.ToString());

                //    }
                //}
                i++;
            }

 

706,705


Viewing all articles
Browse latest Browse all 6793

Trending Articles


Mide ağrısı için


Alessandra Torre - Karanlık Yalanlar


Şekilli süslü hazır floodlar


Flatcast Güneş ve Ay Flood Şekilleri


Gone Are the Days (2018) (ENG) (1080p)


Yildiz yükseltme


yc82


!!!!!!!!!! Amın !!!!!!!!!


Celp At Nalı (Sahih Tılsım)


SCCM 2012 Client Installation issue