diff --git a/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/WorkerReportLogic.cs b/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/WorkerReportLogic.cs index 68915a3..bc55a6a 100644 --- a/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/WorkerReportLogic.cs +++ b/HardwareShop/HardwareShopBusinessLogic/BusinessLogics/Worker/WorkerReportLogic.cs @@ -1,4 +1,5 @@  +using HardwareShopBusinessLogic.MailWorker; using HardwareShopBusinessLogic.OfficePackage; using HardwareShopBusinessLogic.OfficePackage.HelperModels; using HardwareShopBusinessLogic.OfficePackage.Implements; @@ -24,16 +25,16 @@ namespace HardwareShopContracts.BusinessLogicsContracts private readonly AbstractSaveToWord _saveToWord; private readonly AbstractSaveToPdf _saveToPdf; - private readonly MailSender _mailSender; + private readonly MailKitWorker _mailKitWorker; - public WorkerReportLogic(IPurchaseStorage purchaseStorage, MailSender mailSender, IBuildStorage buildStorage, AbstractSaveToPdf saveToPdf, AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord) + public WorkerReportLogic(IPurchaseStorage purchaseStorage, MailKitWorker mailKitWorker, IBuildStorage buildStorage, AbstractSaveToPdf saveToPdf, AbstractSaveToExcel saveToExcel, AbstractSaveToWord saveToWord) { _purchaseStorage = purchaseStorage; _buildStorage = buildStorage; _saveToExcel = saveToExcel; _saveToWord = saveToWord; _saveToPdf = saveToPdf; - _mailSender = mailSender; + _mailKitWorker = mailKitWorker; } /// @@ -161,14 +162,14 @@ namespace HardwareShopContracts.BusinessLogicsContracts DateTo = model.DateTo, ReportPurchases = GetPurchase(model) }); - // _mailSender.SendMailAsync(new() - // { - // MailAddress = reportModel.UserEmail, - // Subject = "Отчет по покупкам", - // Text = $"За период с {reportModel.DateFrom.ToShortDateString()} " + - //$"по {reportModel.DateTo.ToShortDateString()}.", - // File = file - // }); + // _mailKitWorker.SendMailAsync(new() + // { + // MailAddress = reportModel.UserEmail, + // Subject = "Отчет по покупкам", + // Text = $"За период с {reportModel.DateFrom.ToShortDateString()} " + + //$"по {reportModel.DateTo.ToShortDateString()}.", + // File = file + // }); } } } \ No newline at end of file