private void Buscar() { try { DgvListado.DataSource = NUsuario.Buscar(TxtBuscar.Text); LblTotal.Text = "Total Registros: " + Convert.ToString(DgvListado.Rows.Count); } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } this.Limpiar(); }
//Metodo para filtrar entre las categorias existentes private void Buscar() { try { //Llenamos el DataGrid con el metodo Listar de la Clase Ncategoria DgvListado.DataSource = NUsuario.Buscar(TxtBuscar.Text); //Aplicamos el formato al datagrid con el metodo "Formato" this.Formato(); //Le asignamos texto al Label total Registros LblTotal.Text = "Total Registros: " + Convert.ToString(DgvListado.Rows.Count); } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } }
private void Buscar() { try { DgvListado.DataSource = NUsuario.Buscar(txtBuscar.text); if (txtBuscar.text != Convert.ToString(DgvListado.DataSource)) { MessageBox.Show("no se encuentra", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { this.Formato(); } labelTotal.Text = " TOTAL DE REGISTROS: \t" + Convert.ToString(DgvListado.Rows.Count); } catch (Exception e) { MessageBox.Show(e.Message + e.StackTrace); } }
private void Buscar() { this.dgvRegistros.DataSource = NUsuario.Buscar(this.txtBuscarNombre.Text, this.dtF1.Text, this.dtF2.Text); //this.OcultarColumnas(); lblTotal.Text = "Total de registros: " + Convert.ToString(dgvRegistros.Rows.Count); }
private void Buscar() { DgvUsuario.DataSource = NUsuario.Buscar(TxtBuscar.Text); }