Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
Appointment Recurrence
posted

Hi,

 I was wondering if you could provide some examples / pointer to examples of  setting recurrence. I would specifically like to know how to setup recurring appointment for

1. Every few minutes (say 15 mins) 

2. Every day at time t.

Many thanks,

Sameer 

Parents
No Data
Reply
  • 69832
    Offline posted

    1. The highest frequency supported is one per day, as in MS Outlook.

    2. See following code sample:

    //  Create an AppointmentRecurrence  instance.
    AppointmentRecurrence recurrence = new AppointmentRecurrence();

    //  Set the PatternFrequency to Daily to generate an occurrence every day.
    recurrence.PatternFrequency = RecurrencePatternFrequency.Daily;

    //  Set the OccurrenceStartTime and OccurrenceDuration such that
    //  the resulting appointment occur at 9AM , with a duration of
    //  30 minutes.
    recurrence.OccurrenceStartTime = DateTime.Today.AddHours( 9 );
    recurrence.OccurrenceDuration = TimeSpan.FromMinutes( 30 );

    //  Add an Appointment and assign the recurrence
    Appointment appointment = this.dayView.CalendarInfo.Appointments.Add( DateTime.Today, "Recurrence" );
    appointment.Recurrence = recurrence;

Children
No Data