Exemplo n.º 1
0
        private void t_buscar_TextChanged(object sender, EventArgs e)
        {
            if (t_buscar.Text != "")
            {
                tabla_productos.CurrentCell = null;
                foreach (DataGridViewRow r in tabla_productos.Rows)
                {
                    r.Visible = false;
                }

                foreach (DataGridViewRow r in tabla_productos.Rows)
                {
                    foreach (DataGridViewCell c in r.Cells)
                    {
                        if ((c.Value.ToString().ToUpper()).IndexOf(t_buscar.Text.ToUpper()) == 0)
                        {
                            r.Visible = true;
                            break;
                        }
                    }
                }
            }
            else
            {
                CN_Ventas obj = new CN_Ventas();
                tabla_productos.DataSource = obj.MostrarProductosVen();
            }
        }
Exemplo n.º 2
0
        public void MostrarProductosVentas()
        {
            CN_Ventas objeto = new CN_Ventas();

            tabla_productos.DataSource = objeto.MostrarProductosVen();
        }