private void Print() { string templatePath = _settings.PaymentDetailsTemplatePath; string pdfPath = _settings.PdfsFolder; try { List <PaymentDetailsReport> report = PaymentDetails.ToList(); DataTable table = PaymentDetailsReport.FillData(report); var mail = new ExcelMail(); mail.SendTable(table, templatePath, pdfPath); } catch (Exception ex) { Helper.LogAndShow(ex); } }
protected override void Print() { string path = (string)_settings.Get(SettingsNames.PAYM_REPORT_PATH); ExcelFileProperties prop = new ExcelFileProperties(); prop.PrintDirectly = false; prop.Path = path; prop.StartRowIndex = 3; prop.StartcolumnIndex = 1; prop.Source = PaymentDetailsReport.FillData(_uiReportList); try { ExcelPrinterBase printer = new PaymentTransTempPrinter(); printer.Print(prop); } catch (Exception ex) { Helper.LogAndShow(ex); } }