Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Execption on days with no recurrence (Read 2509 times)
bxsl
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Oct 10th, 2006
Execption on days with no recurrence
Jan 29th, 2007 at 3:38am
Print Post  
I load all appointments from my sql db all works great just have a problem with exceptions as follows. Say you have a recurrence pattern of every Monday Wednesday and Friday but the user drags the Monday appointment to Tuesday how do I show an exception on a day that the recurrence does not full on? I hide the item on the Monday with item.Recurrence.GenerateItems but how do I Generate exceptions on a day that the recurrence does not full on?
  
Back to top
WWW  
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Execption on days with no recurrence
Reply #1 - Jan 29th, 2007 at 6:43am
Print Post  
If you need to create an exception out of an item, change any of the item's properties. This will automatically mark the item as an exception. For example, if you need to create an exception by moving an item from Monday to Tuesday, change the item's StartTime and EndTime properties and the control will automatically mark the item as exception (there is no need to hide the item). Considering that 'item' is a reference to the Monday item, here is the code to mark the item as exception by moving it to Tuesday:

Code
Select All
item.StartTime += TimeSpan.FromDays(1);
item.EndTime += TimeSpan.FromDays(1); 



Meppy
  
Back to top
 
IP Logged
 
bxsl
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 28
Joined: Oct 10th, 2006
Re: Execption on days with no recurrence
Reply #2 - Jan 29th, 2007 at 8:13am
Print Post  
Thanks for that, so simple me fells so dumb!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint