private void bandedGridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { MonthlyRembursementSalaryItem item = bandedGridView1.GetRow(bandedGridView1.FocusedRowHandle) as MonthlyRembursementSalaryItem; if (item != null && e.Column.Caption == "打印") { RembursementSalaryVoucher report = new RembursementSalaryVoucher(item); ReportPrintTool tool = new ReportPrintTool(report); tool.PrintDialog(); } }
private void ShowPrintDialog() { MonthlyRembursementSalaryItem item = bandedGridView1.GetRow(bandedGridView1.FocusedRowHandle) as MonthlyRembursementSalaryItem; if (item != null) { RembursementSalaryVoucher report = new RembursementSalaryVoucher(item); ReportPrintTool tool = new ReportPrintTool(report); tool.ShowPreview(); } }