Skip to content

DevExpress-Examples/winforms-scheduler-bind-xpo-multi-resource-appointments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinForms Scheduler - Bind to multi-resource appointments with XPO

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:

  1. Reference the DevExpress.Xpo.vX.y.dll assembly.
  2. Declare XPAppointment and XPResource classes derived from XPObject.
  3. Rebuild the solution.
  4. Drop two XPCollection components from the toolbox onto a Form. Name these components as "xpCollectionAppointments" and "xpCollectionResources".
  5. Set their ObjectClassInfo properties to the XPAppointment and XPResource objects, respectively.
  6. Set the DeleteObjectOnRemove property of the xpCollectionAppointments to true.
  7. Set the SchedulerStorage.Appointments.DataSource property to xpCollectionAppointments.
  8. Set the SchedulerStorage.Resources.DataSource property to xpCollectionResources.
  9. Set up required mappings for AppointmentStorage and ResourceStorage.
  10. 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)