private void button1_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            int order_ID = Convert.ToInt32(dgvOrders.CurrentRow.Cells[0].Value);

            RPT.rpt_orders      report = new RPT.rpt_orders();
            RPT.FRM_RPT_PRODUCT frm    = new RPT.FRM_RPT_PRODUCT();
            report.SetDataSource(order.GetOrderDetails(order_ID));
            frm.crystalReportViewer1.ReportSource = report;
            frm.ShowDialog();
            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 2
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            //get The last order
            this.Cursor = Cursors.WaitCursor;
            int order_ID = Convert.ToInt32(order.GET_LAST_ORDER_FOR_PRINT().Rows[0][0]);

            RPT.rpt_orders      report = new RPT.rpt_orders();
            RPT.FRM_RPT_PRODUCT frm    = new RPT.FRM_RPT_PRODUCT();
            report.SetDataSource(order.GetOrderDetails(order_ID));
            frm.crystalReportViewer1.ReportSource = report;
            frm.ShowDialog();
            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 3
0
        private void btnPrintOrder_Click(object sender, EventArgs e)
        {
            //this to make cursor waiting
            this.Cursor = Cursors.WaitCursor;
            //get last order
            int order_id = Convert.ToInt32(order.GET_Last_Orders_ID_FOR_PRINT().Rows[0][0]);

            // form for crestal report
            RPT.rpt_Orders      report = new RPT.rpt_Orders();
            RPT.FRM_PRT_PRODUCT frm    = new RPT.FRM_PRT_PRODUCT();
            report.SetDataSource(order.GetOrderDetails(order_id));
            frm.crystalReportViewer1.ReportSource = report;
            frm.ShowDialog();

            //this to make cursor Default
            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 4
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            try
            {
                //this to make cursor waiting
                this.Cursor = Cursors.WaitCursor;
                //get last order
                int order_id = Convert.ToInt32(DGV_ORDERSlist.CurrentRow.Cells[0].Value);
                // form for crestal report
                RPT.rpt_Orders      report = new RPT.rpt_Orders();
                RPT.FRM_PRT_PRODUCT frm    = new RPT.FRM_PRT_PRODUCT();
                report.SetDataSource(order.GetOrderDetails(order_id));
                frm.crystalReportViewer1.ReportSource = report;
                frm.ShowDialog();

                //this to make cursor Default
                this.Cursor = Cursors.Default;
            }
            catch
            {
                return;
            }
        }