Hello, I have a problem with the function Datamanager.GetActivities.The problem occurs only with recurring appointments. I create the following series • IsTimeZoneNeutral = True • FREQ = DAILY; INTERVAL = 1, COUNT = 10; WKST = MO GetActivities gives me two results on the first day
and the last day of the series no result.
I plan all the dates separately delivered correctly by GetActivities. Thanks for your support
Hello Marcus,
I have been looking into the modified sample application and the reason for this behavior is that when set the IsTimeZoneNeutral property of an activity, its Start and End are based on the UTC time (you can refer to the following article that explains that property: http://help.infragistics.com/NetAdvantage/WPF/current/CLR4.0/?page=InfragisticsWPF4.Controls.Schedules.v12.2~Infragistics.Controls.Schedules.ActivityBase~IsTimeZoneNeutral.html) and since in the GetActivities method you are passing DateTime objects, that are based on your local time, the method returns different result. When you are calling the GetActivities method for activities that are TimeZone Neutral, you can use time zone neutral range, in order to get the actual activities in that range. To do that, you can call the ToUniversalTime method of the DateTime objects, used for the range of the GetActivities method as follows:
var d = DateTime.Now;
var d1 = new DateTime(d.Year, d.Month, d.Day, 0, 0, 0).ToUniversalTime();
var d2 = new DateTime(d.Year, d.Month, d.Day, 23, 59, 59).ToUniversalTime();
var result = dataManager.GetActivities(new ActivityQuery(
ActivityTypes.Appointment,
new Infragistics.DateRange(d1, d2),
calendars[0]));
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Sorry forgot. I use the latest version 12.2
Hello Krasimir,
I changed the example.
It's about the first day or the last day of the series.In the program for the first day, two Appointments in the return of the function.
Thank You
Thank you for your post. I have been looking into the issue that you have described and I could not managed to reproduce it. I have created a sample application that contains a XamOutlookCalendarView with recurrent appointment which occurs every day in a period of 10 days. When I call the GetActivities method and pass the range of the days that contains the recurrent appointments, all 10 appointments are returned form the method. I have tested the sample application using the RTM and the latest service release of version 12.2, with the same result.
Would you please tell me if you can reproduce the issue using my sample application and if not, would you please modify my sample to show the issue, in order to be able to provide you with more accurate assistance on the matter?
Looking forward to hearing from you.