Esempio n. 1
0
        private void Home_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'myInventorySystemDataSet13.Products' table. You can move, or remove it, as needed.
            this.productsTableAdapter2.Fill(this.myInventorySystemDataSet13.Products);
            // TODO: This line of code loads data into the 'myInventorySystemDataSet9.SubCategory' table. You can move, or remove it, as needed.
            this.subCategoryTableAdapter1.Fill(this.myInventorySystemDataSet9.SubCategory);
            // TODO: This line of code loads data into the 'myInventorySystemDataSet8.Products' table. You can move, or remove it, as needed.
            this.productsTableAdapter1.Fill(this.myInventorySystemDataSet8.Products);
            // TODO: This line of code loads data into the 'myInventorySystemDataSet5.SubCategory' table. You can move, or remove it, as needed.
            this.subCategoryTableAdapter.Fill(this.myInventorySystemDataSet5.SubCategory);
            // TODO: This line of code loads data into the 'myInventorySystemDataSet4.Unit' table. You can move, or remove it, as needed.
            this.unitTableAdapter.Fill(this.myInventorySystemDataSet4.Unit);
            // TODO: This line of code loads data into the 'myInventorySystemDataSet3.Category' table. You can move, or remove it, as needed.
            this.categoryTableAdapter.Fill(this.myInventorySystemDataSet3.Category);
            // TODO: This line of code loads data into the 'myInventorySystemDataSet2.Customers' table. You can move, or remove it, as needed.
            this.customersTableAdapter.Fill(this.myInventorySystemDataSet2.Customers);
            // TODO: This line of code loads data into the 'myInventorySystemDataSet1.Products' table. You can move, or remove it, as needed.
            this.productsTableAdapter.Fill(this.myInventorySystemDataSet1.Products);
            // TODO: This line of code loads data into the 'myInventorySystemDataSet.Users' table. You can move, or remove it, as needed.
            this.usersTableAdapter.Fill(this.myInventorySystemDataSet.Users);

            CrystalReportTransection rTrn = new CrystalReportTransection();

            crystalReportViewerTransection.ReportSource = rTrn;

            CrystalReportCustomer rCus = new CrystalReportCustomer();

            crystalReportViewerCustomer.ReportSource = rCus;

            CrystalReportProduct rPRo = new CrystalReportProduct();

            crystalReportViewerProduct.ReportSource = rPRo;
        }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        con.Open();
        SqlCommand cmd = con.CreateCommand();

        cmd.CommandText = "SELECT     Customer_name, Customer_email_id, Mobile_No, Customer_address FROM         dbo.Customer WHERE Active=@a";
        cmd.Parameters.AddWithValue("@a", "yes");
        DataTable      dt = new DataTable();
        SqlDataAdapter da = new SqlDataAdapter(cmd);

        da.Fill(dt);
        con.Close();
        CrystalReportCustomer cr = new CrystalReportCustomer();

        cr.SetDataSource(dt);
        CrystalReportViewer1.ReportSource = cr;
        CrystalReportViewer1.Zoom(75);
    }