private void btnDirigeAgregarRes(object sender, EventArgs e) { FrmReservacion frmres = new FrmReservacion(); frmres.con = con; frmres.modo = "C"; frmres.ShowDialog(); }
private void dgvReserv_CellDobleClick(object sender, DataGridViewCellEventArgs e) { try { DataGridViewRow row = this.dgvReservaciones.SelectedRows[0]; FrmReservacion frm = new FrmReservacion(); frm.N_Reservacion = row.Cells[0].Value.ToString(); frm.Empleado = row.Cells[1].Value.ToString(); frm.Aula = row.Cells[2].Value.ToString(); frm.Usuario = row.Cells[3].Value.ToString(); frm.FechaReservacion = row.Cells[4].Value.ToString(); frm.Cantidad_horas = row.Cells[5].Value.ToString(); frm.Comentario = row.Cells[6].Value.ToString(); frm.Estado = row.Cells[7].Value.ToString(); frm.modo = "U"; frm.con = con; frm.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Error al editar" + ex.Message); } }