Exemple #1
0
        private void btnprint_Click(object sender, EventArgs e)
        {
            int ID_SHOP = Convert.ToInt32(DGVSHOP.CurrentRow.Cells[0].Value);

            RPT.RPT_SHOP        REPORT = new RPT.RPT_SHOP();
            RPT.FRM_RPT_PRODUCT FRM    = new RPT.FRM_RPT_PRODUCT();
            REPORT.SetDataSource(SHOP.GET_SHOP_DETAILS(ID_SHOP));
            FRM.crystalReportViewer1.ReportSource = REPORT;
            FRM.ShowDialog();
        }
        private void buttonX2_Click(object sender, EventArgs e)
        {
            int ID_SHOP = Convert.ToInt32(shop.GET_LAST_SHOP_FOR_PRINT().Rows[0][0]);

            RPT.RPT_SHOP        REPORT = new RPT.RPT_SHOP();
            RPT.FRM_RPT_PRODUCT FRM    = new RPT.FRM_RPT_PRODUCT();
            REPORT.SetDataSource(shop.GET_SHOP_DETAILS(ID_SHOP));
            FRM.crystalReportViewer1.ReportSource = REPORT;
            FRM.ShowDialog();
        }