Quantcast
Viewing all articles
Browse latest Browse all 7205

How to use reminders on a web form without the scheduler control

This example demonstrates how to work with reminders on a web page that does not have the ASPxScheduler control.

This approach uses the non-visual SchedulerStorage component to obtain appointments from a database.
Every 10 seconds the timer initiates a callback to the ASPxCallback control with an empty parameter. In the server ASPxCallback.Callback event handler, we call the 
SchedulerStorage.TriggerAlerts method that fires the SchedulerStorage.ReminderAlert event. In the SchedulerStorage.ReminderAlert event handler, we can obtain the 
ReminderAlertNotificationCollection and pass it to the client via ASPxCallback.JSProperties.
In the ASPxClientCallback.CallbackComplete event handler, we check the ReminderAlertNotificationCollection and add all the reminders to the ASPxListBox control.
When an end-user wants to dismiss a specific reminder, he/she must click the Dismiss button for a certain appointment.
Then we send a callback to the ASPxCallback control with the appointment Id as a parameter.
In the ASPxCallback.Callback event we use the Reminder.Dismiss method to dismiss the reminder.

When the example starts, it creates five appointments with reminders. Wait for a couple of minutes to see the appointments in the ASPxListBox control.
Then you can use the Dismiss button to dismiss a certain reminder.

Use the sqript.sql script from the project to create a scheduler database. Make sure you change the connection string.


Note, to use this example, it is necessary to have both the ASP and WinForms subscriptions.


Viewing all articles
Browse latest Browse all 7205

Trending Articles