// Create the meeting. Appointment meeting = new Appointment(service); // Set properties on the meeting. meeting.Subject = "Daily Meeting"; meeting.Body = "This one hour meeting will recur daily for two weeks, starting on January 1, 2009."; meeting.Start = new DateTime(2009, 1, 1, 10, 0, 0); meeting.End = meeting.Start.AddHours(1); meeting.Location = "Conf Room 1"; meeting.RequiredAttendees.Add("User1@contoso.com"); // Set the recurrence information on the meeting. // The meeting will recur daily for two weeks, starting on January 1, 2009. meeting.Recurrence = new Recurrence.DailyPattern(meeting.Start.Date, 1); meeting.Recurrence.StartDate = meeting.Start.Date; meeting.Recurrence.EndDate = (meeting.Start.Date).AddDays(13); // Create the meeting and send the meeting invitation to attendees. meeting.Save(SendInvitationsMode.SendOnlyToAll); // Create the appointment. Appointment appointment = new Appointment(service); // Set properties on the appointment. appointment.Subject = "Appointment - Every Third Day"; appointment.Body = "This one hour appointment will recur every third day, starting on January 1, 2009, and continuing through March 31, 2009."; appointment.Start = new DateTime(2009, 1, 1, 10, 0, 0); appointment.End = appointment.Start.AddHours(1); // Set the recurrence information on the appointment. // The appointment will recur every third day, starting on Januray 1, 2009, and continuing through March 31, 2009. appointment.Recurrence = new Recurrence.DailyPattern(appointment.Start.Date, 3); appointment.Recurrence.StartDate = appointment.Start.Date; appointment.Recurrence.EndDate = new DateTime(2009, 3, 31); // Save the recurring series. appointment.Save();
Appointment
最新推荐文章于 2021-02-23 23:51:49 发布