private void btAddFlight_Click(object sender, EventArgs e) { AddFlight add = new AddFlight(); if (add.ShowDialog() == DialogResult.OK) { AddFlightInfo(add.Flight, add.Time, add.Count); } }
private void btEdit_Click(object sender, EventArgs e) { if (listBox.SelectedItem != null) { string flight = listBox.SelectedItem as string; int currIndex = listBox.SelectedIndex; AddFlight edit = new AddFlight(flight, Flight[flight], FlightBaggageCount[flight]); if (edit.ShowDialog() == DialogResult.OK) { DelectFlightInfo(flight, currIndex); AddFlightInfo(edit.Flight, edit.Time, edit.Count); } } }