This example demonstrates how to use Object-Relational Mapping Library (XPO) to bind the WinForms Scheduler control with multi-resource appointments (the AppointmentStorage.ResourceSharing option is enabled).
Follow the steps below:
- Reference the DevExpress.Xpo.vX.y.dll assembly.
- Declare
XPAppointment
andXPResource
classes derived from XPObject. - Rebuild the solution.
- Drop two XPCollection components from the toolbox onto a Form. Name these components as "xpCollectionAppointments" and "xpCollectionResources".
- Set their ObjectClassInfo properties to the
XPAppointment
andXPResource
objects, respectively. - Set the DeleteObjectOnRemove property of the xpCollectionAppointments to true.
- Set the
SchedulerStorage.Appointments.DataSource
property toxpCollectionAppointments
. - Set the
SchedulerStorage.Resources.DataSource
property toxpCollectionResources
. - Set up required mappings for
AppointmentStorage
andResourceStorage
. - Handle SchedulerStorage.AppointmentsChanged and SchedulerStorage.AppointmentsInserted events to save persistent objects.
Documentation
Does this example address your development requirements/objectives?
(you will be redirected to DevExpress.com to submit your response)