This is a migrated thread and some comments may be shown as answers.
Expanding the reocurance rule ???.
1 Answer 3 Views
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 18 Apr 2016, 09:20 AM

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.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 21 Apr 2016, 07:32 AM
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.
Asked by
Philip
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or