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

Issue in updating delete status of reccurring appointment

5 Answers 83 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
roshani
Top achievements
Rank 1
roshani asked on 04 Apr 2011, 05:49 AM
Hello Admin,

I have used Telerik scheduler. Following is the code that I am using to update the delete status of the appointment
protected void rsAppointments_OnAppointmentDelete(object sender, AppointmentDeleteEventArgs e)
       {
           try
           {
               Appointment appToEdit = rsAppointments.PrepareToEdit(e.Appointment, rsAppointments.EditingRecurringSeries);
               appToEdit.Attributes["IsDeleted"] = "1";
 
               rsAppointments.UpdateAppointment(appToEdit);
               ScriptManager.RegisterStartupScript(Page, GetType(), "alert", "alert('Appointment deleted successfully');", true);
               ViewState["Deleted"] = "1";
               // upScheduler.Update();
           }
           catch (Exception ex)
           {
               string ErrorMessage = ex.Message;
               SysLog.LogException(ex, MessageTypeEnum.DatabaseException, MessageSeverityEnum.Error);
           }
       }
 Actually before updating the website with the developer version this code was working fine for both recurring and non-recurring appointments. But after deploying the developer version, When I tried to delete the a nonreccurring appointment this works fine and when i tried to delete  an occuerrence  the update appointment event is fired directly. Control does not hit this code while deleting the occurence. Hence it just update the master appointment by adding the exception in the reccurrencerule but it doesn't insert this occurrence as new appointment. I was doing the final testing for the project. Everything was working fine with the trial version n now getting this strange behavior after adding the developer version. While deleting nonreccuring appointments or series it hits the AppointmentDelete event first but while deleting the occurrnece it is hitting to the AppointmentUpdate event directly.
Please provide your guidance as soon as possible.. Its urgent.

Thanks,
Roshani

5 Answers, 1 is accepted

Sort by
0
roshani
Top achievements
Rank 1
answered on 04 Apr 2011, 07:43 AM
Also one more issue I noticed is :

I created a reccurring appointment and updated it using edit reccurring series. After this i tried  to update the status of an occurence by using the button on the appointment template, It automatically updates the status for the whole series instead of creating exception for the occurence and then inserting it. Also If I created a reccuerence appointment and directly click on the button then it cretes an exception for that occurence and then insert it in the databse which is very expected behaviour. But as told earlier this is not happening in case if i update the reccuring appointment as "Edit whole series" before performing these operations. I have used AppointmentCommand event.

I just want to update the that occurence only..

0
Peter
Telerik team
answered on 04 Apr 2011, 02:58 PM
Hi roshani,

You can use OccurrenceDelete server side event of RadScheduler.

Kind 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
0
roshani
Top achievements
Rank 1
answered on 04 Apr 2011, 04:33 PM
Thanks i will try this........
Can you provide the solution for other problem....
0
Karl Wilkens
Top achievements
Rank 1
answered on 05 May 2011, 03:01 PM
Hi,

I am using the OccurrenceDelete event to delete a single occurrence. The event fires, we get the modified RecurrenceRule and store it in a database. The GUI updates. However if we close the browser and then re-run, the occurrence is present.

The recurrence string we are getting from the appointment is this, which does not appear to have enough information for an exception date
DTSTART:20110517T000000Z
DTEND:20110518T000000Z
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU
EXDATE:2011

Any thoughts on what we are doing wrong? Also, interesting to note that once the OccurrenceDelete event fires, the Update event files right after that. Not the behavior we expected. Any help welcome. Thanks!
0
Peter
Telerik team
answered on 05 May 2011, 03:51 PM
Hi Karl,

AppointmentUpdate needs to also fire because the master appointment updates its recurrence rule with the exception created. AppointmentUpdate is also the event which you need to get the correct recurrence rule with e.ModifiedAppointment.RecurrenceRule.

More on working with recurring appointments you can read here -
http://www.telerik.com/help/aspnet-ajax/scheduler-working-with-recurring-appointments.html


All the best,
Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Scheduler
Asked by
roshani
Top achievements
Rank 1
Answers by
roshani
Top achievements
Rank 1
Peter
Telerik team
Karl Wilkens
Top achievements
Rank 1
Share this question
or