【问题标题】:Get appointments for all rooms预约所有房间
【发布时间】:2015-01-30 01:41:19
【问题描述】:

目前,我可以获取一个房间的所有约会,但是我有很多房间,如果我想显示所有约会,性能很差,所以我想问是否有方法获取多个房间的所有约会 one时间?

【问题讨论】:

    标签: exchange-server exchangewebservices


    【解决方案1】:

    不,没有操作可以做到这一点。但是,如果您请求 CalendarDetails,您可以使用 GetUserAvailbility 操作,该操作将为您提供 FreeBusy 状态和日历属性 Start,End,Location,Subject 的子集,请参阅http://msdn.microsoft.com/en-us/library/office/hh532567%28v=exchg.80%29.aspx。此操作有一些限制,通常是 42 天的时间窗口,每个请求最多只能检索 100 个邮箱。

    干杯 格伦

    【讨论】:

      【解决方案2】:

      https://msdn.microsoft.com/en-us/library/office/dn495614(v=exchg.150).aspx

      // Initialize values for the start and end times, and the number of appointments to retrieve.
              DateTime startDate = DateTime.Now;
              DateTime endDate = startDate.AddDays(30);
              const int NUM_APPTS = 5;
      
              // Initialize the calendar folder object with only the folder ID. 
              CalendarFolder calendar = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, new PropertySet());
      
              // Set the start and end time and number of appointments to retrieve.
              CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS);
      
              // Limit the properties returned to the appointment's subject, start time, and end time.
              cView.PropertySet = new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End);
      
              // Retrieve a collection of appointments by using the calendar view.
              FindItemsResults<Appointment> appointments = calendar.FindAppointments(cView);
      
              Console.WriteLine("\nThe first " + NUM_APPTS + " appointments on your calendar from " + startDate.Date.ToShortDateString() + 
                                " to " + endDate.Date.ToShortDateString() + " are: \n");
      
              foreach (Appointment a in appointments)
              {
                  Console.Write("Subject: " + a.Subject.ToString() + " ");
                  Console.Write("Start: " + a.Start.ToString() + " ");
                  Console.Write("End: " + a.End.ToString());
                  Console.WriteLine();
              }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多