Skip to main content

PersistentObjectEventArgs.Object Property

Gets the persistent object for which the event was raised.

Namespace: DevExpress.XtraScheduler

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

#Declaration

public PersistentObject Object { get; }

#Property Value

Type Description
PersistentObject

A DevExpress.XtraScheduler.PersistentObject which specifies the object for which the event was raised.

#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();
    }
}
See Also