Drag Occurence |
Post Reply |
Author | |
WaaZ
Senior Member Joined: 31 January 2006 Location: United Kingdom Status: Offline Points: 103 |
Post Options
Thanks(0)
Posted: 10 February 2006 at 6:03am |
hi, I have a master event and a recurrence pattern, which means that there is a series of occurences. If I click and drag one of the occurences to another location, the occurence turns into an exception with a new date and time. I have stored this data in the database. Note that the exception has a different date/time. When I load the form on which my calendar is a next time.. I need to make my exception replace the occurence.. and have the exception represented on the new "date/time" Can I have a sample code that deals with that also please, because I really need it and the representation of the exception is still a problem for me. Related forums: https://forum.codejock.com/forum_posts.asp?TID=3609&PN=1 https://forum.codejock.com/forum_posts.asp?TID=3595&PN=1 https://forum.codejock.com/forum_posts.asp?TID=3576&PN=1 Thnx WaaZ
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi WaaZ,
Please find some more description on times below: 1. Normal event and occurrence event have Start/End times. 2. Exception event has Start/End times and Start/End times of the occurrence (RExceptionStartTimeOrig, RExceptionEndTimeOrig). MakeAsRException performs 2 actions: - change recurrence state to exception and - copy times: RExceptionStartTimeOrig = StartTime RExceptionEndTimeOrig = EndTime This mean that for an exception you have to store 4 values of time (not 2): StartTime EndTime RExceptionStartTimeOrig RExceptionEndTimeOrig There are 2 ways to restore exception time properties: 1. ------------------------------------------------------------ --------------------- excepEv.StartTime = <original ocurrence start time> excepEv.EndTime = <original ocurrence end time> excepEv.MakeAsRException() // copy times to RExceptionStartTimeOrig, RExceptionEndTimeOrig excepEv.StartTime = <new exception start time> excepEv.EndTime = <new exception end time> 2. ------------------------------------------------------------ --------------------- excepEv.MakeAsRException() excepEv.RExceptionStartTimeOrig = <original ocurrence start time> excepEv.RExceptionEndTimeOrig = <original ocurrence end time> excepEv.StartTime = <new exception start time> excepEv.EndTime = <new exception end time> -- WBR, Serge |
|
WaaZ
Senior Member Joined: 31 January 2006 Location: United Kingdom Status: Offline Points: 103 |
Post Options
Thanks(0)
|
Thnks, it works fine. |
|
WaaZ
Senior Member Joined: 31 January 2006 Location: United Kingdom Status: Offline Points: 103 |
Post Options
Thanks(0)
|
Hi again, I click and drag an occurence and in the Event handler CalendarControl_EventChanged(object sender, AxXtremeCalendarControl._DCalendarControlEvents_EventChangedEvent e), I get hold of e.eventID. The following code returns null; CalendarHitTestInfo HitTest;HitTest = CalendarControl.ActiveView.HitTest(); HitTest.ViewEvent -- .ViewEvent is nullAnd also the following returns null: CalendarControl.DataProvider.GetEvent(e.eventID); Can you please tell me how I can get hold of the new exception created and the new date. Thnks WaaZ |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Something like following:
-- WBR, Serge |
|
WaaZ
Senior Member Joined: 31 January 2006 Location: United Kingdom Status: Offline Points: 103 |
Post Options
Thanks(0)
|
It works fine, Thnk u |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |