Back to Devexpress

AppointmentStorageBase.GetAppointmentById(Object) Method

corelibraries-devexpress-dot-xtrascheduler-dot-appointmentstoragebase-dot-getappointmentbyid-x28-system-dot-object-x29.md

latest3.5 KB
Original Source

AppointmentStorageBase.GetAppointmentById(Object) Method

Gets the appointment by its identifier.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.CoreDesktop

Declaration

csharp
public Appointment GetAppointmentById(
    object id
)
vb
Public Function GetAppointmentById(
    id As Object
) As Appointment

Parameters

NameTypeDescription
idObject

An object that is the unique identifier of an appointment.

|

Returns

TypeDescription
Appointment

An Appointment object.

|

Remarks

Tip

To get appointment by its ID from the collection of appointments, use the AppointmentCollection.GetAppointmentById method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetAppointmentById(Object) 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.

asp-net-web-forms-scheduler-copy-paste-appointment-context-menu-items/CS/WebApplication1/Default.aspx.cs#L97

csharp
int copyAppointmentID = Convert.ToInt32(hdCopiedAppointmentID.Value);
Appointment sourceAppointment = ASPxScheduler1.Storage.Appointments.GetAppointmentById(copyAppointmentID);
if(sourceAppointment != null) {

asp-net-web-forms-scheduler-copy-paste-appointment-context-menu-items/VB/WebApplication1/Default.aspx.vb#L100

vb
Dim copyAppointmentID As Integer = Convert.ToInt32(hdCopiedAppointmentID.Value)
Dim sourceAppointment As Appointment = ASPxScheduler1.Storage.Appointments.GetAppointmentById(copyAppointmentID)
If sourceAppointment IsNot Nothing Then

Implements

GetAppointmentById(Object)

See Also

AppointmentStorageBase Class

AppointmentStorageBase Members

DevExpress.XtraScheduler Namespace