Exemple #1
0
        private void btnGerarRelatorio_Click(object sender, EventArgs e)
        {
            string codigoProduto = "";
            BllRelListagemDePecas bllRelListagemDePecas = new BllRelListagemDePecas();

            try
            {
                if (txtCodigoProduto.Text.Equals(""))
                {
                    codigoProduto = "*";
                }
                else
                {
                    codigoProduto = bllRelListagemDePecas.TratarCodigoProduto(txtCodigoProduto.Text);
                }
            }
            catch (Exception)
            {
                throw;
            }

            this.uspRelListagemDePecasTableAdapter.Fill(this.DBPromodaDataSetUspRelListagemDePecas.uspRelListagemDePecas, "01", codigoProduto, "000", "01", Convert.ToDateTime(dtpDataInicial.Value.ToShortDateString()), Convert.ToDateTime(dtpDataFinal.Value.ToShortDateString()));
            this.rptRelListagemDePecas.RefreshReport();

            txtCodigoProduto.Text = "";
        }