private void Buscar() { try { DgvListado.DataSource = NVenta.Buscar(TxtBuscar.Text); this.Formato(); LblTotal.Text = "Total de registros: " + Convert.ToString(DgvListado.Rows.Count); } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } }
private void Buscar() { try { DgvListado.DataSource = NVenta.Buscar(txtBuscar.text); if (txtBuscar.text.Equals(Convert.ToString(DgvListado.DataSource))) { MessageBox.Show("no se encuentra", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception e) { MessageBox.Show(e.Message + e.StackTrace); } }
//Método Buscar private void Buscar() { this.dgvListado.DataSource = NVenta.Buscar(this.dtpBusqueda.Text); this.OcultarColumnas(); }
private void Buscar() { this.dataListado.DataSource = NVenta.Buscar(this.txtBuscar.Text.Trim()); this.ocultarColumnas(); lblTotal.Text = "Total de Registros: " + Convert.ToString(dataListado.Rows.Count); }