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); } }
Hi cxnguye,
I tested your scenario with WebMonthView linked to WebScheduleInfo, but I could not reproduce this issue - the ActivityUpdating event was fired as expected. What is the exact version you are using? Is it possible for you to provide a running sample, demonstrating this issue? Thank you.
Please test it with the WebDayView below using Version=12.1.20121.2119. Just so that we're on the same page, I'm not talking about the client event ActivityUpdating that calls a client-side javascript method; I'm talking about the OnActivityUpdating control method as shown in my previously posted WebScheduleInfo code that is supposed to call a server-side method.
<ig_sched:WebDayView ID="uiAppointmentCalendar" runat="server" TimeSlotInterval="FifteenMinutes" WebScheduleInfoID="datAppointments" Height="480px" Width="99%" EnableAutoActivityDialog="False" CaptionHeaderVisible="False" NavigationButtonsVisible="False" EnableViewState="False" EnableActivityMoving="True" EnableActivityResizing="True" DayHeaderFormatString="ddd, MMM d"> <ClientEvents DblClick="uiAppointmentCalendar_DblClick" /> <AppointmentStyle Cursor="Hand"></AppointmentStyle> <ActivityEdgeFreeStyle BackColor="#FEDD6B"></ActivityEdgeFreeStyle> <ActivityEdgeTentativeStyle BackColor="Red"></ActivityEdgeTentativeStyle> <ActivityEdgeOutofOfficeStyle BackColor="#64BF7D"></ActivityEdgeOutofOfficeStyle> <ActivityEdgeBusyStyle BackColor="#F57B7D"></ActivityEdgeBusyStyle> <ActivityEdgeLeftStyle BackColor="White"> </ActivityEdgeLeftStyle></ig_sched:WebDayView>
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.
I am attaching the sample.
Hello,
Please feel free to contact me if you need any further assistance with the matter.
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.
Thank you for the reply.
Let me know if you have any questions about this.