Ejemplo n.º 1
0
        private void vendaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmVendas venda = new frmVendas(IDFUNCIONARIO);
            venda.txDescricao.AutoCompleteCustomSource.Clear();
            try
            {
                DataTable table = acessar.Produtos_RetornaDescricao();
                frmCarregando carregar = new frmCarregando();
                carregar.Show();
                foreach (DataRow row in table.Rows)
                {
                    string aux = (string)row[1];
                    venda.txDescricao.AutoCompleteCustomSource.Add(aux);
                }
                carregar.Close();
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }

            venda.ShowDialog();
        }
Ejemplo n.º 2
0
        private void SubMenuGerenciarProdutos_Click(object sender, EventArgs e)
        {
            frmProdutos produtos = new frmProdutos(IDFUNCIONARIO);
            try
            {
                frmCarregando carregar = new frmCarregando();
                carregar.Show();
                DataTable table = acessar.Produtos_RetornaDescricao();
                foreach (DataRow row in table.Rows)
                {
                    string aux = (string)row[1];
                    produtos.txDescricao.AutoCompleteCustomSource.Add(aux);
                }
                carregar.Close();
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }

            produtos.ShowDialog();
        }
Ejemplo n.º 3
0
        private void GeraCustomSource()
        {
            try
            {
                frmCarregando carregando = new frmCarregando();
                carregando.Show();
                DataTable table = acessar.Produtos_RetornaDescricao();

                foreach (DataRow row in table.Rows)
                {
                    string aux = (string)row[1];
                    txDescricao.AutoCompleteCustomSource.Add(aux);
                }
                carregando.Close();
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }