Beispiel #1
0
        private void tsbPrint_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0)
                return;

            long id = long.Parse(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, col_id).ToString());
            Account a = Account.CreateByID(id);
            if (!a.CanPrint())
            {
                MessageBox.Show("该单据尚未支付,无法打印!");
                return;
            }

            // Create a report.
            //rptAccountPrint report = new rptAccountPrint(id);
            rptAccount report = new rptAccount(id);

            // Show the report's preview.
            ReportPrintTool tool = new ReportPrintTool(report);
            tool.ShowPreview();
        }
Beispiel #2
0
        // 打印单据
        private void tbPrint_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            // Create a report.
            rptAccount report = new rptAccount(_account.ID);

            // Show the report's preview.
            ReportPrintTool tool = new ReportPrintTool(report);
            tool.ShowPreview();
        }