Emitting XtraScheduler Reminder XML


In a previous post I discussed how to generate the XML that the DevExpress XtraScheduler uses when persisting its appointment resource ID’s to a database. You can read that blog post here, and review the structure of the XtraScheduler data tables here.

In this post I’ll cover how to create the XML needed to persist XtraScheduler reminder information to a database. It’s pretty straight forward but not covered (yet) in the DevExpress documentation for the XtraScheduler control.

Again you’ll need a reference to the DevExpress.XtraScheduler.XML namespace. The classes you’ll be using are ReminderInfo and ReminderInfoContextElement. Here is an example of how to use ReminderInfo along with ReminderInfoContextElement:

        private string GetReminderInfoXML(DateTime? reminderDate, int? reminderMinutes)
        {
            ReminderInfo reminderInfo = new ReminderInfo();

            if (reminderDate != null)
            {
                reminderInfo.AlertTime = reminderDate.Value;
            }
            else if (reminderMinutes != null)
            {
                reminderInfo.TimeBeforeStart = new TimeSpan(0, reminderMinutes.Value, 0);
            }

            ReminderInfoContextElement element = new ReminderInfoContextElement(reminderInfo, DateSavingType.LocalTime);
            return element.ValueToString();
        }

I’ve also put together a small working example that you can download here.

UPDATE: There’s a real-world example of this technique you can find here. It is an open source project for transferring data from ExpressScheduler to XtraScheduler.

0 thoughts on “Emitting XtraScheduler Reminder XML

  1. Pingback: Emitting XtraScheduler Resource ID XML « Development Technobabble

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>