public async Task GetLastReport() { var lastPrintReport = CacheBusinessLogic.LastPrintReport; try { var lastReport = await _reportsBussinessLogic.GetReceipt(lastPrintReport); if (_cacheBusinessLogic.RECEIPT_TYPE.ToUpper() != "DEFAULT" && lastPrintReport != null && lastReport.Count > 0) { switch (_cacheBusinessLogic.RECEIPT_TYPE.ToLower()) { case "en-ar": lastReport = Helper.En_Ar_List(lastReport); break; } } ReportContent = string.Join("\n", lastReport.ToArray()); } catch (FileNotFoundException) { ShowNotification(ApplicationConstants.NoReportFound, null, null, ApplicationConstants.ButtonWarningColor); } }
private async void Print() { if (CacheBusinessLogic.AreFuelPricesSaved) { var report = await _reportsBusinessLogic.GetReceipt(ReportType.PriceFile); PerformPrint(report); } }
protected async Task PrintReport(string reportName) { try { var reportContent = await _reportsBussinessLogic.GetReceipt(reportName); PerformPrint(reportContent); } catch (PrinterLayerException) { ShowNotification(ApplicationConstants.NoPrinterFound, null, null, ApplicationConstants.ButtonWarningColor); } }