Skip to main content
All docs
V17.2

Fundamentals

  • 4 minutes to read

Scheduling Application

An ordinary scheduling application usually consists of three basic components - the Scheduler Control, Scheduler Storage and Date Navigator. These controls implement the basic functionality required for a scheduling application. They provide end-user interactions, data persistence, reminders, and synchronization with other scheduling applications. In summary, this interaction is shown in the schema below.

SchedulingBasics1

The Scheduler Control displays the appointments data to end-users and responds to their input. All its data is provided via the Scheduler Storage. The Scheduler Control knows nothing about the data layer, while the Scheduler Storage knows nothing about end-user interaction. Together these two controls comprise the core of any scheduling application built upon the XtraScheduler suite.

The Date Navigator lets end-users change the date or the set of dates for which the Scheduler Control currently shows its appointments data. This selection is passed to the assigned Scheduler Control, which then loads all the necessary data from the Scheduler Storage and represents it using the active view. Note that if the currently selected date has been changed for the Scheduler Control (either programmatically of by an end-user), then the assigned Date Navigator will also synchronize its range of selected dates, as appropriate.

Data Layer

All data processing in the XtraScheduler is performed by the Scheduler Storage component. Scheduler Storage operates with the data layer to provide appointments and resources data to the scheduling application. Scheduler Storage contains separate data stores for persistent objects - one for appointments (SchedulerStorage.Appointments) and another for resources (SchedulerStorage.Resources). When providing data to these stores, it is necessary to specify mappings between data fields in the data source and object properties in the storage. The stores optimize data loading, enable you to specify required options and provide custom fields to operate with additional data.

SchedulingBasics2

Both the AppointmentStorage and the ResourceStorage are inherited from the base PersistentObjectStorage<T> class, which provides all the basic functionality required for data binding. To bind a storage to a specific data table (or another data object) it’s necessary to set its PersistentObjectStorage<T>.DataSource and PersistentObjectStorage<T>.DataMember properties. Then set the mappings for the standard and custom properties to corresponding data fields in the bound data source as described in the Mappings section. For example, if the bound data source contains a field called “ProcessStartTime”, the Appointment Storage needs to be aware that the value of this data field is the appointment’s Appointment.Start value.

The Appointment Storage contains two collections of appointment labels and statuses accessible with the AppointmentStorage.Labels and AppointmentStorage.Statuses properties. The collections are initialized with standard items (as in MS Outlook 2003) by default. However, you can modify these collections as needed.

The following schema illustrates the Appointment Storage and its main properties:

SchedulingBasics3

The Resource Storage provides all the functionality required to provide resources data for the Scheduler Storage. The relationship between appointments and resources is established via the data fields mapped to the AppointmentMappingInfo.ResourceId and ResourceMappingInfo.Id properties. An appointment can be associated with several resources if SchedulerStorageBase.ResourceSharing property is set to true, if the data field in the appointment data source mapped with the AppointmentMappingInfo.ResourceId is capable of holding XML content.

The following schema illustrates the Resource Storage and its main properties:

SchedulingBasics4

Visualization

The SchedulerControl Control obtains appointments and related objects (resource containers - resource headers, day view columns, single weeks, timelines) from the SchedulerStorage Component. It has no direct interaction with the data source. Appointments are displayed using one of the Views and can be grouped by resources or dates. The View object provides access to multiple properties used to adjust the Scheduler look.

Appointments within the Scheduler Control are visualized with the AppointmentViewInfo objects. These objects are accessible, for example, in the SchedulerControl.CustomDrawAppointment event handler with the CustomDrawObjectEventArgs.ObjectInfo property.

Multiple CustomDraw* events give you full control of how a particular Scheduler object is painted.

For appointment selection, time and resource navigation, use the Scheduler Services in addition to the corresponding control methods. Services provide more versatile methods to perform a specific task, because the service can be easily substituted with a proper descendant.