private void DirigirAgregarAula(object sender, EventArgs e) { AgregarAula getaddau = new AgregarAula(); getaddau.con = con; getaddau.modo = "C"; getaddau.ShowDialog(); }
private void dgvdoubleclick(object sender, DataGridViewCellEventArgs e) { try { DataGridViewRow row = this.dgvAulas.SelectedRows[0]; AgregarAula frm = new AgregarAula(); frm.IdAula = row.Cells[0].Value.ToString(); frm.Nombre = row.Cells[1].Value.ToString(); frm.TipoAula = row.Cells[2].Value.ToString(); frm.Edificio = row.Cells[3].Value.ToString(); frm.Capacidad = row.Cells[4].Value.ToString(); frm.CuposReservados = row.Cells[5].Value.ToString(); frm.Estado = row.Cells[6].Value.ToString(); frm.modo = "U"; frm.con = con; frm.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Error al ejecutar consulta: " + ex.Message); } }