private void button1_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);

            Reports.Report_Orders rep = new Reports.Report_Orders();
            rep.Refresh();
            rep.SetDataSource(orders.Get_Order_Details(id));
            Reports.Product_Report frm = new Reports.Product_Report();
            frm.crystalReportViewer1.ReportSource = rep;
            frm.ShowDialog();
        }
Beispiel #2
0
        private void buttonPrint_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            int id = Convert.ToInt32(orders.Get_Last_Id_For_Print().Rows[0][0]);

            Reports.Report_Orders rep = new Reports.Report_Orders();
            rep.Refresh();
            rep.SetDataSource(orders.Get_Order_Details(id));
            Reports.Product_Report frm = new Reports.Product_Report();
            frm.crystalReportViewer1.ReportSource = rep;
            frm.ShowDialog();
            this.Cursor = Cursors.Default;
        }