private void editToolStripMenuItem_Click(object sender, EventArgs e) { int doctorId = int.Parse(doctorsListView.SelectedItems[0].Tag.ToString()); DoctorEntryForm doctorEntryForm = new DoctorEntryForm("Update", doctorId); doctorEntryForm.Show(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (doctorsListView.SelectedItems.Count > 0) { int doctorId = int.Parse(doctorsListView.SelectedItems[0].Tag.ToString()); DoctorEntryForm doctorEntryForm = new DoctorEntryForm("Update", doctorId); Close(); doctorEntryForm.Show(); } else { MessageBox.Show("You must Select a row"); } }
private void addNewDoctorButton_Click(object sender, EventArgs e) { DoctorEntryForm doctorEntryForm=new DoctorEntryForm(null,0); doctorEntryForm.Show(); }