public static Appointment FindAppointment(ASPxAppointmentStorage storage, string id, int occurenceIndex)
    {
        // Iterate through normal appointments, patterns and exceptions.
        Appointment apt = FindBaseAppointment(storage.Items, id);

        if (apt != null && occurenceIndex >= 0)
        {
            // Calculate occurrence for a given pattern.
            return(GetRecurringAppointment(apt, occurenceIndex));
        }
        return(apt);
    }
    private void ShowAppointment(string appointmentId)
    {
        string[] parts  = appointmentId.Split(new char[] { OccurenceDivider });
        string   baseId = parts[0];

        ASPxAppointmentStorage storage = ASPxScheduler1.Storage.Appointments;
        Appointment            apt;

        if (parts.Length == 2)
        {
            int occurrenceIndex = Convert.ToInt32(parts[1]);
            apt = AppointmentSearchHelper.FindAppointment(storage, baseId, occurrenceIndex);
        }
        else
        {
            apt = AppointmentSearchHelper.FindAppointment(storage, baseId);
        }

        UpdateControls(apt, appointmentId);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.ASPxScheduler1 = new ASPxScheduler();
        // Enhance performance by switching navbuttons calculations off.
        this.ASPxScheduler1.ActiveView.NavigationButtonVisibility = NavigationButtonVisibility.Never;
        // Use invisible scheduler control.
        ASPxScheduler1.Visible = false;

        ASPxAppointmentStorage appointments = ASPxScheduler1.Storage.Appointments;

        appointments.Mappings.AppointmentId  = "ID";
        appointments.Mappings.Description    = "Description";
        appointments.Mappings.End            = "EndTime";
        appointments.Mappings.RecurrenceInfo = "RecurrenceInfo";
        appointments.Mappings.Start          = "StartTime";
        appointments.Mappings.Subject        = "Subject";
        appointments.Mappings.Type           = "EventType";

        ASPxScheduler1.AppointmentDataSource = ObjectDataSource1;
        ASPxScheduler1.DataBind();
    }
 public static Appointment FindAppointment(ASPxAppointmentStorage storage, string id)
 {
     return(FindAppointment(storage, id, -1));
 }