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,
Thanks for the information. I tested the WebDayView with the same settings and version you specified but I could not reproduce the behavior you have described. The ActivityUpdating server-side event was fired after I update an appointment.
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>
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.