Example #1
0
 /// <summary>
 ///   Handles the Click event of the ApmtDue_Button control. Calls a new instance of the <see cref = "OpticianDB.Forms.Dialogs.AppointmentsOnPatient" /> form and if the patient opens an appointment record then a new <see cref = "OpticianDB.Forms.Dialogs.AppointmentInProgress" /> form is added using the selected record.
 /// </summary>
 /// <param name = "sender">The source of the event.</param>
 /// <param name = "e">The <see cref = "System.EventArgs" /> instance containing the event data.</param>
 private void ApmtDue_ButtonClick(object sender, EventArgs e)
 {
     using (AppointmentsOnPatient ap1 = new AppointmentsOnPatient(inUseRecId))
     {
         ap1.ShowDialog();
         if (ap1.DialogResult == DialogResult.OK)
         {
             using (AppointmentInProgress ap2 = new AppointmentInProgress(ap1.recId))
             {
                 ap2.ShowDialog();
             }
         }
     }
 }
Example #2
0
        /// <summary>
        ///   Handles the Click event of the LoadAppointment_Button control. Loads the selected appointment into a <see cref = "OpticianDB.Forms.Dialogs.AppointmentInProgress" /> form and closes
        /// </summary>
        /// <param name = "sender">The source of the event.</param>
        /// <param name = "e">The <see cref = "System.EventArgs" /> instance containing the event data.</param>
        private void LoadAppointment_Button_Click(object sender, EventArgs e)
        {
            if (appointments_DayView.SelectedAppointment == null)
            {
                MessageBox.Show("No appointment was selected to be loaded", "Could not load appointment",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            AppointmentInProgress ap1 = new AppointmentInProgress(GetSelectedAppointmentId());

            ap1.Show();
            Close();
        }