private void addButton_Click(object sender, EventArgs e) { AirportInfo airportInfo = new AirportInfo(user, "add"); airportInfo.Show(); this.Hide(); }
private void airportsDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (airportsDataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Length == 3)//если выбранная ячейка - код авиалинии { AirportInfo airportInfo = new AirportInfo(user, airportsDataGridView.Rows[e.RowIndex].Cells[0].Value.ToString(), airportsDataGridView.Rows[e.RowIndex].Cells[1].Value.ToString(), airportsDataGridView.Rows[e.RowIndex].Cells[2].Value.ToString(), airportsDataGridView.Rows[e.RowIndex].Cells[3].Value.ToString(), airportsDataGridView.Rows[e.RowIndex].Cells[4].Value.ToString(), airportsDataGridView.Rows[e.RowIndex].Cells[5].Value.ToString(), "update"); airportInfo.Show(); this.Hide(); } }