private void txtId_TextChanged(object sender, EventArgs e) { if (radioButton2.Checked && txtId.TextLength == 13) { Base_de_datos busc = new Base_de_datos(); busc.Buscar(txtId.Text); dataGridView1.DataSource = busc.Mostrar_Resultados(); } else { dataGridView1.DataSource = null; } }
private void txtnom_TextChanged(object sender, EventArgs e) { if (radioButton1.Checked && txtnom.TextLength >= 1) { Base_de_datos busc = new Base_de_datos(); busc.Buscar(txtnom.Text.ToUpper(), txtape.Text.ToUpper()); dataGridView1.DataSource = busc.Mostrar_Resultados(); } else { dataGridView1.DataSource = null; } }