private void button2_Click(object sender, EventArgs e) { this.Hide(); AddFlightForm form2 = new AddFlightForm(0); form2.ShowDialog(); }
private void btn_modify_Click(object sender, EventArgs e) { ListViewItem item = new ListViewItem(); if (this.lv_Main.SelectedItems.Count > 0) { item = this.lv_Main.SelectedItems[0]; } switch (this.category) { case "flights": AddFlightForm addFlight = new AddFlightForm(Int32.Parse(item.SubItems[0].Text)); addFlight.ShowDialog(); this.ReloadListView(); break; case "airplanes": AddModifyAirplane plane = new AddModifyAirplane(Int32.Parse(item.SubItems[3].Text)); plane.ShowDialog(); this.ReloadListView(); break; case "airlines": Add_ModifyAirline line = new Add_ModifyAirline(Int32.Parse(item.SubItems[5].Text)); line.ShowDialog(); this.ReloadListView(); break; } }
private void editFlightItem_Click(object sender, EventArgs e) { AddFlightForm form2 = new AddFlightForm(this.id); form2.ShowDialog(); this.ReloadListView(); }
private void addToolStripMenuItem_Click(object sender, EventArgs e) { AddFlightForm form2 = new AddFlightForm(0); form2.ShowDialog(); this.ReloadListView(); }
private void btn_add_Click(object sender, EventArgs e) { switch (this.category) { case "flights": AddFlightForm addFlight = new AddFlightForm(0); addFlight.ShowDialog(); this.ReloadListView(); break; case "airplanes": AddModifyAirplane plane = new AddModifyAirplane(0); plane.ShowDialog(); this.ReloadListView(); break; case "airlines": Add_ModifyAirline line = new Add_ModifyAirline(0); line.ShowDialog(); this.ReloadListView(); break; } }