This is a migrated thread and some comments may be shown as answers.
example for CreateRecurrenceException/RemoveRecurrenceExceptions (WCF SQL DataProvider)
7 Answers 65 Views
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 14 Dec 2009, 07:32 PM
I have created a WCF SQL provider however i can't find any examples of the code for: CreateRecurrenceException and RemoveRecurrenceExceptions.

Do you any examples detailing these methods? 

Thanks

7 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 17 Dec 2009, 02:53 PM
Hi Steve,

Those methods don't need to be implemented directly. Instead, they should be delegated to the WebServiceAppointmentController class as demonstrated here:
http://www.telerik.com/help/aspnet-ajax/webservicebinding-binding.html

I hope this helps.

Regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Steve
Top achievements
Rank 1
answered on 17 Dec 2009, 04:38 PM
I am currently getting a NullReferenceException in AppointmentController.PrepareToEdit

   at Telerik.Web.UI.Scheduling.AppointmentController.PrepareToEdit(Appointment appointmentToEdit, Boolean editSeries) 
   at Telerik.Web.UI.WebServiceAppointmentController.CreateRecurrenceException[T](ISchedulerInfo schedulerInfo, T recurrenceExceptionData) 
   at Telerik.Web.UI.WebServiceAppointmentController.CreateRecurrenceException(ISchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData) 
   at SchedulerWCFService.CreateRecurrenceException(SchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData) in c:\Users\test\Documents\Projects\IronSpeedApps\test\App_Code\misc\SchedulerWCFService.cs:line 63 
   at SyncInvokeCreateRecurrenceException(Object , Object[] , Object[] ) 
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) 
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) 

here are the parameters:
schedulerInfo 
{Telerik.Web.UI.SchedulerInfo} 
    EnableDescriptionField: true 
    ViewEnd: {18/12/2009 5:00:00 AM} 
    ViewStart: {14/12/2009 5:00:00 AM} 
recurrenceExceptionData 
{Telerik.Web.UI.AppointmentData} 
    Attributes: Count = 1 
    Description: "\n" 
    EncodedID: "/wEFBTEwMl8w" 
    End: {15/12/2009 8:00:00 PM} 
    ID: "102_0" 
    RecurrenceParentID: 102 
    RecurrenceRule: "" 
    RecurrenceState: Exception 
    Resources: Count = 0 
    Start: {15/12/2009 7:30:00 PM} 
    Subject: "Break-test" 
    Visible: false 
 

0
T. Tsonev
Telerik team
answered on 23 Dec 2009, 09:35 AM
Hi Steve,

One possible explanation is that the parent appointment (with ID 102) is not currently loaded. Please, check that the provider is returning this appointment when its GetAppointment method is called as part of the CreateRecurrenceException method call.

I hope this helps.

All the best,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
towpse
Top achievements
Rank 2
answered on 04 Jan 2010, 10:28 PM
How do I find out what the WebServiceAppointmentController's CreateRecurrenceException method does?
I was expecting it to work similarly to WebServiceAppointmentController.InsertAppointment where the WebServiceAppointmentController would call my provider's method.
This doesn't seem to be possible since the ScheduleProviderBase doesn't even implement an abstract method for CreateRecurrenceException.

How are we to use the Recurrence Exception feature?

I delegate the call to the WebServiceAppointmentController

            return WebServiceAppointmentController.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData);

The next thing that gets called is Get Appointments in my custom provider.
My custom provider has a schedule info that should get populated from the client-side ExceptionCreating event:

function AppointmentExceptionCreating(sender, eventArgs) {
    var info = eventArgs.get_schedulerInfo();
    var app = eventArgs.get_appointment();
    CollectUserData(info, app);
}

Are there any good examples or articles on how to go about tackling this whole recurrence exception concept?
0
Dimitar Milushev
Telerik team
answered on 07 Jan 2010, 02:43 PM
Hello,

There is no CreateRecurrenceException abstract method in the ScheduleProviderBase class, because creating a recurrence exception is basically an Update operation on the 'master appointment'. The first thing that the WebServiceAppointmentController does when CreateRecurrenceException is called is to try to find the 'master appointment' and that's why it calls the GetAppointments method of your provider. The Controller will later update the master appointment, but it is unable to reach that part of the code as it cannot find the appointment.

We do not have a specific example or article for implementing recurrence with WCF as the exceptions should work as expected if the retrieving and updating appointments work properly.

Can you please check if your provider returns the master recurrence appointment (ID: 102) when the GetProvider method is called as Tsvetomir suggested?

Greetings,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jose Granja
Top achievements
Rank 1
answered on 04 Jan 2011, 12:56 PM
is there no way to extend the WebServiceAppointmentController class? I would like to create a method to return busy appointments so the user can't book in that space! This appointments would be painted in the background in another color! If you could send me the source code of this class I would be able to do it by myself!

regards,

jose
0
Peter
Telerik team
answered on 06 Jan 2011, 12:57 PM
Hello Jose,

Please, open a support ticket and request the source for the ASP.NET AJAX controls.


Greetings,
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.
Asked by
Steve
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Steve
Top achievements
Rank 1
towpse
Top achievements
Rank 2
Dimitar Milushev
Telerik team
Jose Granja
Top achievements
Rank 1
Peter
Telerik team
Share this question
or