example for CreateRecurrenceException/RemoveRecurrenceExceptions (WCF SQL DataProvider)

8 posts, 0 answers
  1. Steve
    Steve avatar
    3 posts
    Member since:
    Oct 2003

    Posted 14 Dec 2009 Link to this post

    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
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 17 Dec 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve
    Steve avatar
    3 posts
    Member since:
    Oct 2003

    Posted 17 Dec 2009 Link to this post

    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 
     

  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 23 Dec 2009 Link to this post

    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.
  6. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 04 Jan 2010 Link to this post

    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?
  7. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 07 Jan 2010 Link to this post

    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.
  8. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 04 Jan 2011 Link to this post

    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
  9. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 06 Jan 2011 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017