Expanding the reocurance rule ???.

2 posts, 0 answers
  1. Philip
    Philip avatar
    69 posts
    Member since:
    Mar 2016

    Posted 18 Apr Link to this post

    I need to be able to understand how the occurance rule works in the db as I need to be able to extract them to be able to create shift patterns.

     

    01.//Creating a Weekly Recurrence rule
    02.int interval = 2;
    03.RecurrenceRange range = new RecurrenceRange();
    04. 
    05.range.Start = Convert.ToDateTime(rdStartShift.SelectedDate);
    06.range.EventDuration = TimeSpan.FromMinutes(30);
    07.range.MaxOccurrences = 3;
    08.RecurrenceDay recurrenceDay = RecurrenceDay.Wednesday;
    09.// _shifts.RecurrenceRule = new WeeklyRecurrenceRule(interval, recurrenceDay, range).ToString();
    10.DayOfWeek startDayOfWeek = DayOfWeek.Tuesday;
    11._shifts.RecurrenceRule = new WeeklyRecurrenceRule(interval, recurrenceDay, range, startDayOfWeek).ToString();

    I need be able expand this data to add to a list of shifts so that i can set them in the calendar as the start time and end time of an angents shift. So I guess question is how do i expand the recurrance ruel.
  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 21 Apr Link to this post

    Hello Philip,

    The recurrence rule that we use is the standard one and more information on the matter could be found here:
    https://www.ietf.org/rfc/rfc2445.txt

    Indeed the implementation, usage, extension and the overall work with the Recurrence Rule is quite tricky. However I would suggest you to refer to the following forum thread as well, where a colleague of mine had provided a sample example on how this rule could be parsed and used:

    http://www.telerik.com/forums/extract-appointments-for-day-as-list#5kmHNW9mGk-L19mHgsFmOA


    Regards,
    Nencho
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top