Code
CS
Walk-through
In creating a recurring appointment, first, an appointment is created and then the recurrence information has to be set according to the requirement. In the above code, we have created anAppointmentAgent, which we then use to create a new AppointmentEntity. Next, the appointment text, contact, and duration are set.
The recurrence information is specified by creating a recurrence pattern. Here, we want the appointment to recur daily for 8 days starting from tomorrow. Thus the recurrence pattern is set to Daily and further specified as EveryWorkday. RecurrencePattern and RecurrenceDailyPattern are enumerations.
CS
CS
CalculateDays method of the agent. Finally, the recurrence information is assigned to the AppointmentEntity and the appointment is saved to the database.
Get the source code (zip)