private void dgv_Aerolinea_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { if (e.ColumnIndex == 2) { Aerolinea obj = new Aerolinea(); obj.Id_Aerolinea = Convert.ToInt32(dgv_Aerolinea.Rows[e.RowIndex].Cells[0].Value.ToString()); obj.Nombre = dgv_Aerolinea.Rows[e.RowIndex].Cells[1].Value.ToString(); frm_AerolineaEdit ofrm = new frm_AerolineaEdit(obj, this); ofrm.Show(); } } catch (Exception) { } }
private void btn_NuevaAerolinea_Click(object sender, EventArgs e) { frm_AerolineaEdit ofrm = new frm_AerolineaEdit(this); ofrm.ShowDialog(); }