自己写的,不知道对不对,感觉还行
//***********************************************************************************************
//set recurrence of the appointment
//***********************************************************************************************
//1. set IsRecurring of the appointment ,0 for no recurring i.e. only once, 1 for recurring
//2. if no recurring ,set the start datetime and end date time of the appointment
//3. if recurring, set the recurring pattern of the appointment
//3.1 set the start time of the recurrence pattern
//3.2 set the duration or the end time of the recurrence pattern, the system will calculate the duration
// automatically if you set the end time, the system will calculate the end time automatically if you
// set the duration, either is ok
//3.3 set the RecurrenceType of the recurrence pattern, you can choose daily, weekly, monthly, yearly,
// month by number, year by number , no recurrence
//3.3.1 if you choose daily, set the interval of the recurrence pattern
//3.3.2 if you choose weekly, set the interval and the day of week mask of the recurrence pattern
//3.3.3 if you choose monthly,set the day of month and the interval of the recurrence pattern
//3.3.4 if you choose monthly by number, set the interval and the day of week mask ant the instance
// of the recurrence pattern
//3.3.5 if you choose yearly, set the month of year and the day of month of the recurrence pattern
//3.3.6 if you choose yearly by number, set the instace and the day of week mask and
// the month of year of the recurrence pattern
//3.3.7 if you choose no recurrence, set the system refert to 2.
//3.4 set pattern start date of the recurrence pattern
//3.5 set no end date of the recurrence pattern, true if the recurrence has no end date; otherwise false.
//3.5.1 if you choose no end date then finish setting the recurrence pattern
//3.5.2 if you choose end date then you can set the occurrences in the recurrence pattern
// or you can set the pattern end date of the recurrence pattern.