private void button1_Click(object sender, EventArgs e) { SqlCommand comando = new SqlCommand(); AccesoDatos aq = new AccesoDatos(); DataSet ds = new DataSet(); /* DatosSP.Inscripto_DNI(ref comando, int.Parse(textBox1.Text)); * * aq.EjecutarProcedimientoAlmacenado(comando, "verificarExistenciaInscripto"); */ string consulta = "exec verificarExistenciaInscripto " + textBox1.Text; aq.cargaTabla("asd", consulta, ref ds); dataGridView1.DataSource = ds.Tables[0]; try { if (dataGridView1.Columns[dataGridView1.Columns.Count - 1].HeaderText == "baja") { AlumnoSelecionado af = new AlumnoSelecionado(dataGridView1.Rows[0].Cells[0].Value.ToString(), 2); af.ShowDialog(); } else { if (dataGridView1.Columns[dataGridView1.Columns.Count - 1].HeaderText == "observaciones") { AlumnoSelecionado af = new AlumnoSelecionado(dataGridView1.Rows[0].Cells[0].Value.ToString(), 1); af.ShowDialog(); } } } catch { Exception ex; } }
private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { try { string Dni = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["DNI"].Value.ToString(); AlumnoSelecionado aqr = new AlumnoSelecionado(Dni, numtabla); Formularios.AbrirFormularioHijos(aqr); cargardata(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { string Dni = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value.ToString(); //MessageBox.Show(Dni); AlumnoSelecionado aqr = new AlumnoSelecionado(Dni, 1); Formularios.AbrirFormularioHijos(aqr); ds = new DataSet(); consulta = "select * from inscriptos"; aq.cargaTabla("tabla", consulta, ref ds); dataGridView1.DataSource = ds.Tables[0]; }