Print Page | Close Window

Detect past events

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=3542
Printed Date: 27 September 2024 at 1:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Detect past events
Posted By: flauzer
Subject: Detect past events
Date Posted: 20 January 2006 at 11:16am

About to the recurrent events....

What is the best way to find the collection of all the expired events (...to be able then to notify user...)? 
Is better to repeat among all the events of the calendar control and to find expired.... or to find an algorithm to inspect the recurrences?  
 
Consider to have a collection of the control that contains the expired events.... 
 
What If this work will be server-side??? for example from the stored proc of SQL??? some suggestions?? 
 
Thanks

 




Replies:
Posted By: sserge
Date Posted: 22 January 2006 at 4:53am
To perform this task a special object will be added for next versions - called Reminders Manager.
 
Until it is not available, you'll have to exactly "repeat among all the events of the calendar control and to find expired".
 
Note that this task can be easily implemented in the stored procedure only for regular, not recurrence events.  In case with recurrence events it would be more complicated... And the next version with reminders manager could save you from this headache.
 
--
WBR,
Serge


Posted By: flauzer
Date Posted: 22 January 2006 at 11:26am

Thanks for your response Serge...,I confirm headache

For how much I have understood, this "Reminders Manager"  should be an useful "client side" Calendar object.

But, I will be able also to install it "server side" ???....for example inside a business object that calls stored proc  ???? 

this object has "Unattended Execution",  have no interface elements, and is ready to go without user interaction??

Thanks

 

 



Posted By: sserge
Date Posted: 23 January 2006 at 3:02pm
"Reminders Manager" is not a user interface object.
It just provides methods and notifications to work with calendar events reminders.
 
"Reminders Manager" provides an "Active reminders collection",
and helper methods to perform operations: "Snooze", "Dismiss", "DismissAll" and some others.
 
Also it fires a notification when "Active reminders collection" is changed: for exqmple - new reminder is came, reminder(s) is Snoozed or Dismissed.
 
As an example, for the client side it helps you to build Reminders dialod like in MS Outlook.
 
I think you will be able use it on the server side - it does not need user interface. But it is not a completely separate object, it is connected to the calendar control.
And you will need to create a calendar control, enable remindres and get a reminders manager object.
Calendar control can be placed on the hidden form (or created by some other "skilful" way).
You will not need to interact with calendar, only may be set some calendar settings to make it workable and to optimize performance (like set active a Single day view for a day without events: 1/1/1970).
 
Also calendar control will send you some notification to request or update data. You'll have to catch them (may be not all, depends on functionality which you need) and call a stored procedures to write/read data. One of those notifications is DoGetUpcomingEvents - to read events with reminder. DoGetUpcomingEvents can be a slow operation (up to a few seconds) but it should be called not so often - once in 2 hours by default.
 
About recurrences:
You will need to provide only master events in DoGetUpcomingEvents (that is easy) and reminder manager will generate ocurrences internally. Also it allows to store "Snooze time" for ocurrences
(which are virtual or generated events) as far as for normal events.
 
We will provide an example to show how work with this mechanizm.
To simplify an example stored procedures are not used, just an SQL code string is generated and executed.
But it is very easy to move this SQL to a stored procedure. Also example shows how to optimize DoGetUpcomingEvents SQL code.

Hopefully this would help you to get more familiar with the upcoming mechanizm :)

--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net