This is a migrated thread and some comments may be shown as answers.

Keeping a historical version of the calendar in another table

3 Answers 28 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Andrew N
Top achievements
Rank 1
Andrew N asked on 09 May 2010, 05:27 PM
Hello,

My goal is to keep an archive of past appointments placed on the calendar that can be kept up to date when appointments are added, removed or updated on the calendar.

What I would like to do:
Upon appointment Insert
- Capture the ID
- Create a new table with the ID, start and end times and other data necessary for the archive A new row would need to be inserted for each recurrence in the appointment as well should it be recurring.

Upon appointment update
- Use the ID to find all future occurences in the archive table and delete them
- Create new entries in the archive table for all future occurences (same as the insert)

Upon delete
- Delete all future occurences of the appointment in the archive table.

As you can see I want to leave anything that happened historically in place so it can be evaluated later and not affected by changes in the future.

I believe I can add the functions but here are the hurdles I'm facing:

1) I am returning the inserted ID from the insert query in a variable, how do I access that in the appointmentinserted event?

2) There are no recurrence details in the e.appointment variable that I can see, just the pattern. How do I access the recurrence items so I can loop through them and add them to the calendar? in the appointmentinserted and updated events? Do I have to select them using the id into a new object?

I know I saw a post similar to this here a while back, but now I cannot find it. Any tips would be appreciated. Thanks!!! - Andrew

3 Answers, 1 is accepted

Sort by
0
Andrew N
Top achievements
Rank 1
answered on 13 May 2010, 03:38 AM
I've mostly resolved this by handling it in the SQL command routines, but I still have hit another snag.

This seems to be a pretty common one for me.

When I use findbyrecurrenceparentid it does not bring back all appointments. It brings back a seemingly random assortment.

How do I get ALL appointments in a recurrence into a list?

Thanks!
0
Andrew N
Top achievements
Rank 1
answered on 13 May 2010, 03:56 AM
Once again, may have solved another portion.

I found this post:

http://www.telerik.com/community/forums/aspnet-ajax/scheduler/sql-reporting-display-all-recurring-appointments.aspx

Installed and works like a charm from what I can see.
0
Peter
Telerik team
answered on 14 May 2010, 11:27 AM
Hi Andrew N,

Here is another resource (kb article) which might be helpful for this case:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-display-all-radscheduler-appointments-in-gridview.aspx


Regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Ajax
Asked by
Andrew N
Top achievements
Rank 1
Answers by
Andrew N
Top achievements
Rank 1
Peter
Telerik team
Share this question
or