Exemplo n.º 1
0
        private void editAircraftToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Открываем форму изменения выбранного самолета
            EditAircraft NewForm = new EditAircraft(Aircrafts[dataGridView_main.CurrentRow.Index], FormRole.Changing);

            NewForm.ShowDialog(this);

            // Возвращаем данные
            if (NewForm.EditThisAircraftIfNotLeft)
            {
                Aircrafts[dataGridView_main.CurrentRow.Index] = NewForm.EditThisAircraftThisAircraft;
            }

            showDataOnDataGridView(AircraftTableHeaders, 3);
        }
Exemplo n.º 2
0
        private void addAircraftToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Открываем форму добавления самолета
            EditAircraft NewForm = new EditAircraft(new Aircraft(), FormRole.Adding);

            NewForm.ShowDialog(this);

            // Возвращаем данные
            if (NewForm.EditThisAircraftIfNotLeft)
            {
                Aircrafts.Add(NewForm.EditThisAircraftThisAircraft);
            }

            showDataOnDataGridView(AircraftTableHeaders, 3);
        }