以下是修改和删除重复会议发生的链接。
http://msdn.microsoft.com/en-us/library/exchange/dd633618(v=exchg.80).aspx
我的问题是我们如何从ews中获取事件编号,或者有任何方法可以找到它。
Appointment occurrence = Appointment.BindToOccurrence(service, new ItemId(sRecurringMasterId), 3);
在上面的代码中,他们将硬编码的出现次数设为3,但我如何动态获取此信息?
答案 0 :(得分:0)
没有直接的方式,我所做的是以下内容:
以下代码解释了我上面写的内容。
var occurrencesCounter = 0;
if (appointment.AppointmentType == AppointmentType.RecurringMaster)
{
appointments = ppointment.Service.FindAppointments(WellKnownFolderName.Calendar, new CalendarView(appointment.Start, (appointment.Recurrence.EndDate == null ? DateTime.Today.AddDays(7) : (DateTime)appointment.Recurrence.EndDate)));
foreach (var apt in appointments)
{
if (apt.AppointmentType == AppointmentType.Occurrence)
{
occurrencesCounter++;
}
}
}