Exemplo n.º 1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            AirPortEditForm myForm = new AirPortEditForm();

            myForm.act = AirPortEditForm.Action.insert;
            DialogResult result = myForm.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                RefreshItems();
            }
        }
Exemplo n.º 2
0
        private void EditButton_Click(object sender, EventArgs e)
        {
            int             selectedID = (int)airPortListDataGridView.SelectedRows[0].Cells[0].Value;
            AirPortEditForm myForm     = new AirPortEditForm();

            myForm.act = AirPortEditForm.Action.update;
            myForm.airport.GetAirport(selectedID);
            DialogResult result = myForm.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                RefreshItems();
            }
        }