Ejemplo n.º 1
0
 private void Buscar()
 {
     try
     {
         DgvListado.DataSource = NPersona.BuscarProveedores(txtBuscar.Text);
         this.Formato();
         lblTotal.Text = "Total registros: " + Convert.ToString(DgvListado.Rows.Count);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + ex.StackTrace);
     }
 }
Ejemplo n.º 2
0
        private void Buscar()
        {
            try
            {
                DgvListado.DataSource = NPersona.BuscarProveedores(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);
            }
        }