Skip to main content

PersistentObjectEventArgs Class

Provides data for the persistent object events of the SchedulerStorage.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v14.2.Core.dll

#Declaration

public class PersistentObjectEventArgs :
    EventArgs

#Remarks

The PersistentObjectEventArgs class introduces the PersistentObjectEventArgs.Object property that specifies the persistent object being processed in the event handler.

Note that PersistentObjectEventArgs objects are automatically created, initialized and passed to the corresponding event handlers.

#Examples

This example demonstrates how to use the SchedulerStorage.AppointmentInserting event to add a timestamp to the created appointment.

To validate appointment insertion, you can get the properties of the appointment being inserted by casting the e.Object parameter to the Appointment type.

using System;
using DevExpress.XtraScheduler;
// ...

private void SchedulerStorage_AppointmentInserting(object sender, PersistentObjectCancelEventArgs e) {
    Appointment apt = e.Object as Appointment;
    if (apt != null) {
        apt.Description += "\r\ncreated at " + DateTime.Now.ToString();
    }
}

#Inheritance

See Also