Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            AddFlightForm form2 = new AddFlightForm(0);

            form2.ShowDialog();
        }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
        private void editFlightItem_Click(object sender, EventArgs e)
        {
            AddFlightForm form2 = new AddFlightForm(this.id);

            form2.ShowDialog();
            this.ReloadListView();
        }
Ejemplo n.º 4
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddFlightForm form2 = new AddFlightForm(0);

            form2.ShowDialog();
            this.ReloadListView();
        }
Ejemplo n.º 5
0
        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;
            }
        }