예제 #1
0
        public void Pesquisa()
        {
            try
            {
                belManifestacaoPesquisa.Filtro filtro = new belManifestacaoPesquisa.Filtro();
                string sValor1 = string.Empty;
                string sValor2 = string.Empty;
                if (cboFiltro.cbx.SelectedIndex == 0)
                {
                    filtro  = belManifestacaoPesquisa.Filtro.Data;
                    sValor1 = dtpIni.Value.ToString();
                    sValor2 = dtpFim.Value.ToString();
                }
                else if (cboFiltro.cbx.SelectedIndex == 1)
                {
                    filtro  = belManifestacaoPesquisa.Filtro.Cliente;
                    sValor1 = txtCliente.Text;
                }
                else if (cboFiltro.cbx.SelectedIndex == 2)
                {
                    filtro  = belManifestacaoPesquisa.Filtro.Chave;
                    sValor1 = txtCliente.Text;
                }

                objPesquisa           = new belManifestacaoPesquisa(filtro, sValor1, sValor2);
                bsPesquisa.DataSource = objPesquisa.lresult;
                ColoriGrid();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
        public void Pesquisa()
        {
            try
            {

                belManifestacaoPesquisa.Filtro filtro = new belManifestacaoPesquisa.Filtro();
                string sValor1 = string.Empty;
                string sValor2 = string.Empty;
                if (cboFiltro.cbx.SelectedIndex == 0)
                {
                    filtro = belManifestacaoPesquisa.Filtro.Data;
                    sValor1 = dtpIni.Value.ToString();
                    sValor2 = dtpFim.Value.ToString();
                }
                else if (cboFiltro.cbx.SelectedIndex == 1)
                {
                    filtro = belManifestacaoPesquisa.Filtro.Cliente;
                    sValor1 = txtCliente.Text;
                }
                else if (cboFiltro.cbx.SelectedIndex == 2)
                {
                    filtro = belManifestacaoPesquisa.Filtro.Chave;
                    sValor1 = txtCliente.Text;
                }

                objPesquisa = new belManifestacaoPesquisa(filtro, sValor1, sValor2);
                bsPesquisa.DataSource = objPesquisa.lresult;
                ColoriGrid();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }