예제 #1
0
        private void enterclique()
        {
            CCliente c = new CCliente();

            dt = c.pesquisar(ttbcliente.Text, "nome");
            grid.DataSource = dt;
            if (dt.Rows.Count > 0)
            {
                grid.Focus();
            }
        }
예제 #2
0
        private void FRelatorio_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dscliente.DataTable1' table. You can move, or remove it, as needed.
            // this.DataTable1TableAdapter.Fill(this.dscliente.DataTable1);
            // TODO: This line of code loads data into the 'dscliente.DataTable1' table. You can move, or remove it, as needed.
            // this.DataTable1TableAdapter.Fill(this.dscliente.DataTable1);
            // TODO: This line of code loads data into the 'dsproduto.dtproduto' table. You can move, or remove it, as needed.
            //  ReportDataSource MyReportDataSource = new ReportDataSource("dscaixa", dt);
            //reportViewer1.LocalReport.DataSources.Add(MyReportDataSource);
            reportViewer1.LocalReport.DataSources.Clear();

            CCliente         ccliente           = new CCliente();
            DataTable        dtcliente          = ccliente.pesquisar("", "nome");
            ReportDataSource MyReportDataSource = new ReportDataSource("DataSet1", dtcliente);

            reportViewer1.LocalReport.DataSources.Add(MyReportDataSource);

            reportViewer1.RefreshReport();
        }