private void buttonLabs_Click(object sender, EventArgs e) { if (this.currentlyEditingVisit) { MessageBox.Show("Please save or cancel changes before opening labs"); } else { Labs labsForm = new Labs(this.patient.PatientID.Value, this.dateTimePickerVisit.Value, this.checkBoxFinalDiagnosis.Checked); labsForm.ShowDialog(); } }
private void butttonViewLabs_Click(object sender, EventArgs e) { if (this.listViewAppointmentsBetween.SelectedIndices.Count > 0) { int patientId = Convert.ToInt32(this.listViewAppointmentsBetween.SelectedItems[0].SubItems[1].Text); DateTime visitDateTime = Convert.ToDateTime(this.listViewAppointmentsBetween.SelectedItems[0].SubItems[0].Text); Labs labsForm = new Labs(patientId, visitDateTime, true); labsForm.ShowDialog(); } else { MessageBox.Show("Nothing is selected"); } }