1. When editing an appointment, the advance form is displayed. If I make changes to the form and click 'Save', I handle the updates to SQL with the following. This updates my database, but the window does not close. How do I get the modal window to close?
Private Sub UpdateButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdateButton.Click
Dim AppointmentBE as New AppointmentBE
Dim ProspectToolDAL As New ProspectToolDAL
Dim startDateString as String
Dim startTimeString as String
Dim endDateString as String
Dim endTimeString as String
AppointmentBE.Subject = SubjectText.Text
AppointmentBE.AppointmentKey = Appointment.ID
startDateString =
"#" & Format(StartDate.SelectedDate, "MM/dd/yyyy")
startTimeString = StartTime.SelectedDate.Value.ToShortTimeString &
"#"
AppointmentBE.StartTime =
CDate(startDateString & " " & startTimeString)
endDateString =
"#" & Format(EndDate.SelectedDate, "MM/dd/yyyy")
endTimeString = EndTime.SelectedDate.Value.ToShortTimeString &
"#"
AppointmentBE.EndTime =
CDate(endDateString & " " & endTimeString)
Dim appointmentKey as Int32 = ProspectToolDAL.SaveAppointment(AppointmentBE, "U")
End Sub
2. The second problem is once the window is closed (by clicking 'Cancel'), the appointment does not show it's new values. How can I get the scheduler to 'refresh' once the modal window is closed?
Thanks,
Susan