Back to Devexpress

Appointment.GetExceptions() Method

corelibraries-devexpress-dot-xtrascheduler-dot-appointment-dea5a98a.md

latest5.2 KB
Original Source

Appointment.GetExceptions() Method

Returns a collection of the changed and deleted occurrences for the current pattern appointment.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.Core.dll

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
AppointmentBaseCollection GetExceptions()
vb
Function GetExceptions As AppointmentBaseCollection

Returns

TypeDescription
AppointmentBaseCollection

An AppointmentBaseCollection collection which contains the changed and deleted occurrences for the current pattern appointment.

|

Remarks

The GetExceptions method returns a collection of the changed and deleted occurrences for the current pattern appointment. If the current appointment is not a patten (its Appointment.Type is not AppointmentType.Pattern), then the ArgumentException exception is thrown.

See the Recurring Appointments and Exceptions topic for information on pattern appointments and occurrences.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetExceptions() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-scheduler-get-appointment-by-source-object/CS/Form1.cs#L40

csharp
if (apt.Type == AppointmentType.Pattern) {
    RegisterAppointmentRows(apt.GetExceptions());
}

winforms-scheduler-resolve-appointment-conflicts/CS/DXApplication1/Form1.cs#L99

csharp
if(apt.Type == AppointmentType.Pattern) {
    FillConflictedAppointmentsCollection(conflicts, interval, apt.GetExceptions(), currApt);
}

winforms-scheduler-sync-with-ews/CS/EWSSyncExample/Synchronizer.cs#L263

csharp
if(schedulerAppointment.HasExceptions) {
    foreach(SchedulerAppointment exception in schedulerAppointment.GetExceptions()) {
        if(exception.Type == DevExpress.XtraScheduler.AppointmentType.DeletedOccurrence) {

winforms-scheduler-get-appointment-by-source-object/VB/Form1.vb#L49

vb
If apt.Type = AppointmentType.Pattern Then
    RegisterAppointmentRows(apt.GetExceptions())
End If

winforms-scheduler-resolve-appointment-conflicts/VB/DXApplication1/Form1.vb#L90

vb
If apt.Type = AppointmentType.Pattern Then
    FillConflictedAppointmentsCollection(conflicts, interval, apt.GetExceptions(), currApt)
End If

winforms-scheduler-sync-with-ews/VB/EWSSyncExample/Synchronizer.vb#L251

vb
If schedulerAppointment.HasExceptions Then
    For Each exception As DevExpress.XtraScheduler.Appointment In schedulerAppointment.GetExceptions()
        If exception.Type = DevExpress.XtraScheduler.AppointmentType.DeletedOccurrence Then

See Also

HasExceptions

GetOccurrence(Int32)

Appointments

Appointments

Appointment Interface

Appointment Members

DevExpress.XtraScheduler Namespace