【问题标题】:exchange EWS API find appointment by organizer and time frame交换 EWS API 按组织者和时间范围查找约会
【发布时间】:2017-09-20 20:17:02
【问题描述】:

使用 EWS API,我可以使用时间范围和房间的邮箱地址找到约会,如下所示:

public static Appointment GetAppointmentByMailboxAndTimeFrame(ExchangeService EWS,DateTime startDate, DateTime endDate , string mailbox)
    {
        Appointment apt=null;
        try
        {
            // Set the start and end time appointments to retrieve.
            CalendarView cView = new CalendarView(startDate, endDate);
            FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar, mailbox);
            EWS.ImpersonatedUserId = null;
            // Retrieve an appointments by using the calendar view.
            FindItemsResults<Appointment> appointments = EWS.FindAppointments(CalendarFolderId, cView);
            apt= appointments.First();
        }
        catch (Exception)
        {
           apt = null;
        }
        return apt;
    }

我想知道有没有办法使用组织者的电子邮件地址和时间范围为组织者预约?这样做的目的是只有组织者能够更新约会,而不是与会者(房间也是与会者)

【问题讨论】:

    标签: exchange-server exchangewebservices organizer


    【解决方案1】:

    您不能将 CalendarView 与 SearchFilter 结合使用,因此您不能在一个操作中同时执行这两种操作。 CalendarView 是扩展定期约会所必需的,因此您通常最好限制属性集 - 尽可能多地返回,然后在客户端过滤约会。 (从性能的角度来看,这通常会更快)。

    否则,如果您没有任何需要扩展的定期约会,您可以根据各个属性创建一个 SearchFilter。

    【讨论】:

      猜你喜欢
      • 2019-06-12
      • 2014-08-18
      • 1970-01-01
      • 2011-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多