Beispiel #1
0
        private void dGVCompany_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!changedCompany)
            {
                MessageBox.Show("Must save", "Show Category");
            }
            else
            {
                try
                {
                    int    id   = (int)dataGridViewCompany.CurrentRow.Cells["companyIdDataGridViewTextBoxColumn"].Value;
                    string info = (string)dataGridViewCompany.CurrentRow.Cells["nameDataGridViewTextBoxColumn"].Value;

                    FrmFlight flight = new FrmFlight(id, info);

                    flight.ShowDialog(this);

                    flight.Dispose();
                }

                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }

                catch
                {
                    MessageBox.Show("Error go to list of flight", "Go to list flight");
                }
            }
        }