/// <summary> /// Handles edit patient details button clicks /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditPatientDetailsButton_Click(object sender, EventArgs e) { if (this.patientsListView.SelectedItems.Count == 0) { MessageBox.Show("Please select a Patient, then click the button again.", "Select a Patient to Edit Details"); return; } int selectedIndex = this.patientsListView.SelectedIndices[0]; Patient theSelectedPatient = this.thePatientList[selectedIndex]; EditPatientForm theEditPatientForm = new EditPatientForm(this, theSelectedPatient); theEditPatientForm.Show(); this.Enabled = false; }