Пример #1
0
        public void Localizar()
        {
            bool IdOuCat;

            if (cBoxTipoPesquisa.SelectedIndex == 0)
            {
                IdOuCat = true;
            }
            else
            {
                IdOuCat = false;
            }

            DALConexao   cn  = new DALConexao(DALDadosConexao.ConStr);
            BLLCategoria bll = new BLLCategoria(cn);

            GridDados.DataSource = bll.LocalizarCategoria(tBoxConsulta.Text, IdOuCat);
        }
Пример #2
0
        public void Localizar(DataGridView dt, ComboBox c, TextBox t)
        {
            bool       IdOuN;
            DALConexao cn = new DALConexao(DALDadosConexao.ConStr);

            if (t.Name == "tBoxConsUMed")
            {
                if (c.SelectedIndex == 0)
                {
                    IdOuN = false;
                }
                else
                {
                    IdOuN = true;
                }

                BLLUnMedida bll = new BLLUnMedida(cn);
                dt.DataSource = bll.LocalizarUMedida(t.Text, IdOuN);
            }
            else
            {
                if (t.Name == "tBoxConsCat")
                {
                    if (c.SelectedIndex == 0)
                    {
                        IdOuN = false;
                    }
                    else
                    {
                        IdOuN = true;
                    }

                    BLLCategoria bll = new BLLCategoria(cn);
                    dt.DataSource = bll.LocalizarCategoria(t.Text, IdOuN);
                }
            }
        }