Hai,
I,m working with WeeklyRecurrence rule for rad scheduler .my problem is that when using the recurrence day for initializing the rule class , i'm unable to typecast system day to reccurrenceday . is thei any way to get the correct recurrence day for the corresponding system.date.daysofWeek.Imgiving my code below .can anybody help me its urgent.
I,m working with WeeklyRecurrence rule for rad scheduler .my problem is that when using the recurrence day for initializing the rule class , i'm unable to typecast system day to reccurrenceday . is thei any way to get the correct recurrence day for the corresponding system.date.daysofWeek.Imgiving my code below .can anybody help me its urgent.
Appointment rcAppointment = new Appointment("1", StartTime, StartTime.AddMinutes(15), "Menu");
RecurrenceRange rRange = new RecurrenceRange();
rRange.Start = rcAppointment.Start;
rRange.EventDuration = rcAppointment.End - rcAppointment.Start;
rRange.RecursUntil = StartTime.AddDays(8);
RecurrenceDay mask = (RecurrenceDay)(StartTime.DayOfWeek);
WeeklyRecurrenceRule rrule = new WeeklyRecurrenceRule(1, mask, rRange);
foreach (DateTime occurrence in rrule.Occurrences)
{
InsertData(StartTime);
StartTime = StartTime.AddDays(7);
}
When StartTime.DaysOFWeek is typecasted to recurrenceday .its Differnet from the actual day.......
thanks in advance