Back to Devexpress

IPersistentObject.GetSourceObject(ISchedulerStorageBase) Method

corelibraries-devexpress-dot-xtrascheduler-dot-ipersistentobject-dot-getsourceobject-x28-devexpress-dot-xtrascheduler-dot-ischedulerstoragebase-x29.md

latest5.1 KB
Original Source

IPersistentObject.GetSourceObject(ISchedulerStorageBase) Method

Returns the data object that is bound to the current persistent object.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
object GetSourceObject(
    ISchedulerStorageBase storage
)
vb
Function GetSourceObject(
    storage As ISchedulerStorageBase
) As Object

Parameters

NameTypeDescription
storageISchedulerStorageBase

A SchedulerStorageBase object that represents the storage control which owns the persistent object.

|

Returns

TypeDescription
Object

A Object that is the data source object which is bound to the persistent object.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetSourceObject(ISchedulerStorageBase) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-scheduler-linq-to-sql/CS/XtraScheduler_LINQ/Form1.cs#L50

csharp
foreach (Appointment apt in e.Objects) {
    DBAppointment dbApt = (DBAppointment)apt.GetSourceObject(this.schedulerStorage1);
    this.context.DBAppointments.InsertOnSubmit(dbApt);

winforms-scheduler-bind-to-xpo/CS/XPO_XtraScheduler_Simple_Example/Form1.cs#L73

csharp
foreach (Appointment apt in e.Objects) {
    XPBaseObject o = apt.GetSourceObject((SchedulerDataStorage)sender) as XPBaseObject;
    if (o != null)

winforms-scheduler-bind-xpo-multi-resource-appointments/CS/XPO_MultiResource_Example/Form1.cs#L62

csharp
foreach (Appointment apt in e.Objects) {
    XPBaseObject o = apt.GetSourceObject(schedulerDataStorage1) as XPBaseObject;
    if (o != null)

winforms-scheduler-linq-to-sql/VB/XtraScheduler_LINQ/Form1.vb#L53

vb
For Each apt As Appointment In e.Objects
    Dim dbApt As DBAppointment = CType(apt.GetSourceObject(schedulerStorage1), DBAppointment)
    context.DBAppointments.InsertOnSubmit(dbApt)

winforms-scheduler-bind-to-xpo/VB/XPO_XtraScheduler_Simple_Example/Form1.vb#L73

vb
For Each apt As Appointment In e.Objects
    Dim o As XPBaseObject = TryCast(apt.GetSourceObject(DirectCast(sender, SchedulerDataStorage)), XPBaseObject)
    If o IsNot Nothing Then

winforms-scheduler-bind-xpo-multi-resource-appointments/VB/XPO_MultiResource_Example/Form1.vb#L64

vb
For Each apt As Appointment In e.Objects
    Dim o As XPBaseObject = TryCast(apt.GetSourceObject(schedulerDataStorage1), XPBaseObject)
    If o IsNot Nothing Then

See Also

GetRow(ISchedulerStorageBase)

GetValue(ISchedulerStorageBase, String)

IPersistentObject Interface

IPersistentObject Members

DevExpress.XtraScheduler Namespace