Could you please let me based on recurring pattern how to detect the dates? Is there anyway to find out?
Hello email2prasan,
You could handle the ActivityAdding event of the WebSheduleInfo. In it you could get the activity that will be added with e.Activity. From there if there is recurrence pattern applied you can get the pattern or modify it if you wish. You can refer to my previous post for properties of interest that you may get to determine the recurring dates.
Let me know if you need further assistance.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Thanks Maya!!
Could you please me know how to detect recurring dates before I store the recurring pattern to database? I guess the above source code will be useful while displaying appointments however I am looking some source to find recurring dates before I store appointment to database.
Looking forward for your reply.
Hello email2prasan ,
You can get all the necessary information for a recurring appointment to find out which dates it’ll be displayed for. You can get all activities for a specific date with:
ActivitiesSubsetCollection activities =
this. WebScheduleInfo1.GetActivitiesForDate(this.WebScheduleInfo1.ActiveResource,
new SmartDate(DateTime.Now));
For each activity that has recurrence you can get the recurrence pattern(activities[0].Recurrence) . You can get its period and start date ( Period property and StartDateUtc) and also the MaxOccurances if you’ve set any or the EnDateUtc if you’ve set an end date for the recurrence. There’s also a Description property which is a string with a friendly message from when the recurrence is effective and until when. Also holds information about the activity start and end. You can also get the variances associated with this recurrence.
Let me know if you have any questions.