Example E81
Visible to All Users

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)

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.