Hi All,
I having some issues while updating Appointments using ObjectDataSource on Rad Scheduler.
Due to some reason, the appointment start,end time or resource details are not changed on the Scheduler, even though the underlaying database has been updated. Forexample If i move an appointment from one resouce to another, the resource details does not change. Only after I refresh the page, the page displays the accurate details.
I also tried rebinding the Scheduler after calling ObjectDataSource.Update() function under the Scheduler Appointment Update event, so that the system can retrieve the latest data from the database, but nothing happens.
Does anyone know what is causing this problem.
Here is my Appointment_Update event
protected void rsSchedule_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
// My Custom DTO
Activity activity = new Activity();
activity.Id = e.ModifiedAppointment.ID.ToString()
double duration = e.ModifiedAppointment.Duration.Hours;
duration = duration + Convert.ToDouble(e.ModifiedAppointment.Duration.Minutes)/60;
activity.Duration = duration;
activity.StartDateTime = e.ModifiedAppointment.Start;
activity.TechId = e.ModifiedAppointment.Resources[0].Key.ToString();
odsSchedule.UpdateParameters.Clear();
odsSchedule.UpdateParameters.Add(new Parameter("jobId", TypeCode.Int32, activity.Id));
odsSchedule.UpdateParameters.Add(new Parameter("duration", TypeCode.Double, activity.Duration.ToString()));
odsSchedule.UpdateParameters.Add(new Parameter("newDateTime", TypeCode.DateTime, activity.StartDateTime.ToString()));
odsSchedule.UpdateParameters.Add(new Parameter("techCode", TypeCode.String, activity.TechId));
odsSchedule.Update();
}
Thanks in advance,
Haroon
I having some issues while updating Appointments using ObjectDataSource on Rad Scheduler.
Due to some reason, the appointment start,end time or resource details are not changed on the Scheduler, even though the underlaying database has been updated. Forexample If i move an appointment from one resouce to another, the resource details does not change. Only after I refresh the page, the page displays the accurate details.
I also tried rebinding the Scheduler after calling ObjectDataSource.Update() function under the Scheduler Appointment Update event, so that the system can retrieve the latest data from the database, but nothing happens.
Does anyone know what is causing this problem.
Here is my Appointment_Update event
protected void rsSchedule_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
// My Custom DTO
Activity activity = new Activity();
activity.Id = e.ModifiedAppointment.ID.ToString()
double duration = e.ModifiedAppointment.Duration.Hours;
duration = duration + Convert.ToDouble(e.ModifiedAppointment.Duration.Minutes)/60;
activity.Duration = duration;
activity.StartDateTime = e.ModifiedAppointment.Start;
activity.TechId = e.ModifiedAppointment.Resources[0].Key.ToString();
odsSchedule.UpdateParameters.Clear();
odsSchedule.UpdateParameters.Add(new Parameter("jobId", TypeCode.Int32, activity.Id));
odsSchedule.UpdateParameters.Add(new Parameter("duration", TypeCode.Double, activity.Duration.ToString()));
odsSchedule.UpdateParameters.Add(new Parameter("newDateTime", TypeCode.DateTime, activity.StartDateTime.ToString()));
odsSchedule.UpdateParameters.Add(new Parameter("techCode", TypeCode.String, activity.TechId));
odsSchedule.Update();
}
Thanks in advance,
Haroon