/// <summary> /// Raises the delete event. /// </summary> static public void RaiseDeleteEvent(CalendarEvent calEvent) { CalendarEventArgs args = new CalendarEventArgs(); args.CalEvent = calEvent; OnEventDelete(args); }
/// <summary> /// Raises the <see cref="E:EventDelete"/> event. /// </summary> /// <param name="args">The <see cref="Mediachase.Ibn.Calendar.CalendarEventArgs"/> instance containing the event data.</param> static private void OnEventDelete(CalendarEventArgs args) { CalendarEventHandler temp = CalEventDeleteEvent; if (temp != null) { CalEventDeleteEvent(null, args); } }
/// <summary> /// Events the delete handler. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="Mediachase.Ibn.Calendar.CalendarEventArgs"/> instance containing the event data.</param> private void PrimaryEventDeleteHandler(object sender, CalendarEventArgs args) { CalendarEventLink[] eventLinks = CalendarEventLink.List(new FilterElement("EventId", FilterElementType.Equal, args.CalEvent.PrimaryKeyId.Value)); foreach (CalendarEventLink eventLink in eventLinks) { eventLink.Delete(); } }