private void AddPilot_Click(object sender, EventArgs e)
        {
            this.Enabled = false;
            var addPilotForm = new AddEditPilotForm();

            addPilotForm.FormClosed += (a, b) => { EmployeesForm_Load(a, b);
                                                   this.Enabled = true; };
            addPilotForm.Show();
        }
        private void EditPilot(int rowIndex)
        {
            Pilot pilot;
            var   d = (DataRowView)PilotsDataGrid.Rows[rowIndex].DataBoundItem;

            using (var db = new AirlinesContext())
            {
                pilot = (Pilot)db.Employees.Find(d.Row[0]);
            }

            var editPlaneForm = new AddEditPilotForm(pilot);

            this.Enabled = false;

            editPlaneForm.FormClosed += (a, b) => { EmployeesForm_Load(a, b);
                                                    this.Enabled = true; };
            editPlaneForm.Show();
        }