Beispiel #1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            PlaneEdit myForm = new PlaneEdit();

            myForm.act = PlaneEdit.Action.Insert;
            DialogResult result = myForm.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                RefreshItems();
            }
        }
Beispiel #2
0
        private void editButton_Click(object sender, EventArgs e)
        {
            int       _selectedID = (int)dataGridView1.SelectedRows[0].Cells[0].Value;
            PlaneEdit myForm      = new PlaneEdit();

            myForm.act = PlaneEdit.Action.Update;
            myForm.plane.GetPlane(_selectedID);
            DialogResult result = myForm.ShowDialog();

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