private void Report_PrintProgress(object sender, PrintProgressEventArgs e) { var(status, extra) = FolderUtility.CheckAndCreateCurrentPath("Transport List"); if (status == FolderUtilityStatus.Success) { var path = $"{extra}" + $"TransportList_{ReportManagerContext.GetInstance().CurrentInput.SERIAL_NO}.pdf"; if (!Directory.Exists(path)) { (sender as TransportListReport)?.ExportToPdf(path); } } else if (status == FolderUtilityStatus.Error) { XtraMessageBox.Show($"Не удалось сохранить отчет\n{extra}"); } }
private void Report_PrintProgreses(object sender, PrintProgressEventArgs e) { var report = CreateReportInstance(); var name = CreateReportInstance().Report.Band.ToString(); if (name == "Сертификат") { var(status, extra) = FolderUtility.CheckAndCreateCurrentPath("Certificate"); if (status == FolderUtilityStatus.Success) { var path = $"{extra}" + $"Certificate_{ReportManagerContext.GetInstance().CurrentInput.SERIAL_NO}.pdf"; if (!Directory.Exists(path)) { (report as CertificateReport)?.ExportToPdf(path); } } else if (status == FolderUtilityStatus.Error) { XtraMessageBox.Show($"Не удалось сохранить отчет\n{extra}"); } } }