Beispiel #1
0
        private void btnReschedule_Click(object sender, EventArgs e)
        {
            DateTime   newApptTime;
            Doctor     doctor;
            Reschedule resched = new Reschedule(server, sessionManager);

            if (resched.ShowDialog() == DialogResult.OK)
            {
                newApptTime = resched.newTime;
                doctor      = resched.doctor;

                selectedAppointment.AppointmentTime = newApptTime;
                selectedAppointment.Doctor          = resched.doctor;
                selectedAppointment.Status          = "Scheduled";

                if (selectedAppointment.AppointmentTime.CompareTo(DateTime.Now) > 0)
                {
                    updateAppointment();
                }
                else
                {
                    MessageBox.Show("You must reschedule an appointment for a date later than today.", "Error", MessageBoxButtons.OK);
                }

                refreshTab();
            }
            else
            {
            }
        }
Beispiel #2
0
        private void btnReschedule_Click(object sender, EventArgs e)
        {
            DateTime newApptTime;
            Doctor doctor;
            Reschedule resched = new Reschedule(server,sessionManager);
            if (resched.ShowDialog() == DialogResult.OK)
            {

                newApptTime = resched.newTime;
                doctor = resched.doctor;

                selectedAppointment.AppointmentTime = newApptTime;
                selectedAppointment.Doctor = resched.doctor;
                selectedAppointment.Status = "Scheduled";

                if (selectedAppointment.AppointmentTime.CompareTo(DateTime.Now) > 0)
                {
                    updateAppointment();
                }
                else
                {
                    MessageBox.Show("You must reschedule an appointment for a date later than today.", "Error", MessageBoxButtons.OK);
                }

                refreshTab();
            }
            else
            {

            }
        }