I have the following WebScheduleInfo control in an ascx file. The datAppointments_ActivityUpdating method as targeted for the OnActivityUpdating doesn't get called in the code behind for some reasons after the activity has been moved to a different time slot on the calendar. It was working in v7.2, but it no longer does after I upgraded the app to v12.1.
Anyone else having the same issue or having a fix/workaround for this issue?
Calendar.ascx:<ig_sched:WebScheduleInfo ID="datAppointments" runat="server" FirstDayOfWeek="Monday" AllowAllDayEvents="True" EnableReminders="False" WorkDayStartTime="7:00" OnActivityUpdating="datAppointments_ActivityUpdating" EnableSmartCallbacks="True"></ig_sched:WebScheduleInfo>
Calendar.ascx.cs: protected void datAppointments_ActivityUpdating(object sender, CancelableActivityEventArgs e) { try { String jobRequestId = e.Activity.Key.ToString(); DateTime newStartDate = DateTime.Parse(e.Activity.StartDateTime.ToString()); int newDuration = Convert.ToInt32(e.Activity.Duration.TotalMinutes);
JobRequestService service = new JobRequestService(); service.Reschedule(jobRequestId, newStartDate, newDuration); } catch (Exception exception) { ExceptionHandler.LogWebApplicationException(exception); } }
Hello,
Thank you for the reply.
Let me know if you have any questions about this.
Nikolay, thank you for providing the sample. In running it, I was able to catch the OnActivityUpdating event when moving the appointment on the calendar. So it appears something is not working correctly on my side after the upgrade to v12.1. I will have to look more into it and will let you know if I have more questions. Thanks.
Please feel free to contact me if you need any further assistance with the matter.
Hi cxnguye,
I am attaching the sample.
Nikolay, thanks for the testing with WebDayView. It sounds like it may be something on my side. Since my app is pretty big and it's kind of tough to separate parts of the code that contains this issue, do you mind sending me the sample that you're using? That way I can see what needs to be corrected from my side. Thanks.