private void btnWijzigenPassagier_Click(object sender, EventArgs e) { try { frmPassengerManagement PassengerManagement = new frmPassengerManagement(true, passengers[lstPassagiers.SelectedIndex]); if (PassengerManagement.ShowDialog() == DialogResult.OK) { passengers[lstPassagiers.SelectedIndex] = PassengerManagement.Passenger; LoadListboxes(); } } catch (Exception ee) { MessageBox.Show("Select a passenger!"); } }
private void btnToevoegenPassagier_Click(object sender, EventArgs e) { frmPassengerManagement PassengerManagement = new frmPassengerManagement(); if (PassengerManagement.ShowDialog() == DialogResult.OK) { passengers.Add(PassengerManagement.Passenger); LoadListboxes(); } }