exchange server - How to get occurence number of a recurrent meeting from the EWS using c#? -


below link modifying , deleting occurrence of recurrence meeting.

http://msdn.microsoft.com/en-us/library/exchange/dd633618(v=exchg.80).aspx

my question how can occurrence number ews or there way find it.

appointment occurrence = appointment.bindtooccurrence(service, new itemid(srecurringmasterid), 3); 

in above code have hard coded occurrence number 3, how can info dynamically?

there no direct way , following:

  1. get appointment recurringmaster.
  2. define start , ending time recurrence, if there no end time , goes forever, define number of days search within
  3. find appontments based on previous timings
  4. filter results based on type appointmenttype.occurrence, , count got

the following code explains have written above.

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++;         }     }  }  

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -