Back to Devexpress

SchedulerStorageBase.GetAppointments(TimeIntervalCollection, Boolean) Method

corelibraries-devexpress-dot-xtrascheduler-dot-schedulerstoragebase-dot-getappointments-x28-devexpress-dot-xtrascheduler-dot-timeintervalcollection-system-dot-boolean-x29.md

latest4.7 KB
Original Source

SchedulerStorageBase.GetAppointments(TimeIntervalCollection, Boolean) Method

Retrieves the collection of appointments that fall within the specified time interval.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
public AppointmentBaseCollection GetAppointments(
    TimeIntervalCollection intervals,
    bool useCache = false
)
vb
Public Function GetAppointments(
    intervals As TimeIntervalCollection,
    useCache As Boolean = False
) As AppointmentBaseCollection

Parameters

NameTypeDescription
intervalsTimeIntervalCollection

A TimeIntervalCollection object whose Start and End members identify the required time interval.

|

Optional Parameters

NameTypeDefaultDescription
useCacheBooleanFalse

True to use appointment cache to increase performance. When set to false , enables you to operate with SchedulerStorage in multiple threads since different requests for appointments will not use the same cache.

|

Returns

TypeDescription
AppointmentBaseCollection

An AppointmentBaseCollection collection of appointments which belong to the specified time interval.

|

Remarks

The GetAppointments method returns appointments of any type (regular appointments, recurring appointments and exceptions) that belong to the specified time interval. If an appointment’s time interval partially overlaps the specified interval, this appointment is also included in the collection returned.

The GetAppointments method gets appointments contained in the storage and passed through filters. Appointment filters are the AppointmentStorageBase.Filter property and the SchedulerStorageBase.FilterAppointment event.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetAppointments(TimeIntervalCollection, Boolean) 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-print-appointments-using-reports/CS/PrintingViaReports/Form1.cs#L103

csharp
schedulerControl1.Start = DateTime.Now;
AppointmentBaseCollection abc = schedulerStorage1.GetAppointments(schedulerControl1.ActiveView.GetVisibleIntervals());
if (abc.Count > 0)

winforms-scheduler-print-appointments-using-reports/VB/PrintingViaReports/Form1.vb#L94

vb
schedulerControl1.Start = Date.Now
Dim abc As AppointmentBaseCollection = schedulerStorage1.GetAppointments(schedulerControl1.ActiveView.GetVisibleIntervals())
If abc.Count > 0 Then

See Also

SchedulerStorageBase Class

SchedulerStorageBase Members

DevExpress.XtraScheduler Namespace