From 6c97579ac0efd8d8082514c22245a10599c212e2 Mon Sep 17 00:00:00 2001 From: ujijrujijr Date: Mon, 13 May 2024 23:41:25 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GarmentFactory/App.config | 4 ++-- GarmentFactory/FormMain.cs | 1 + .../BusinessLogics/MessageInfoLogic.cs | 2 +- .../MailWorker/AbstractMailWorker.cs | 12 ++++-------- GarmentFactoryClientApp/Views/Home/Mails.cshtml | 2 +- GarmentFactoryClientApp/Views/Shared/_Layout.cshtml | 2 +- GarmentFactoryContracts/ViewModels/OrderViewModel.cs | 1 + .../Implements/ClientStorage.cs | 1 + .../Models/MessageInfo.cs | 1 - GarmentFactoryRestApi/appsettings.json | 4 ++-- 10 files changed, 14 insertions(+), 16 deletions(-) diff --git a/GarmentFactory/App.config b/GarmentFactory/App.config index cdd7638..055eb06 100644 --- a/GarmentFactory/App.config +++ b/GarmentFactory/App.config @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/GarmentFactory/FormMain.cs b/GarmentFactory/FormMain.cs index bbc26eb..ea15fda 100644 --- a/GarmentFactory/FormMain.cs +++ b/GarmentFactory/FormMain.cs @@ -40,6 +40,7 @@ namespace GarmentFactoryView dataGridView.DataSource = list; dataGridView.Columns["TextileId"].Visible = false; dataGridView.Columns["ClientId"].Visible = false; + dataGridView.Columns["ClientEmail"].Visible = false; dataGridView.Columns["ImplementerId"].Visible = false; dataGridView.Columns["TextileName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; diff --git a/GarmentFactoryBusinessLogic/BusinessLogics/MessageInfoLogic.cs b/GarmentFactoryBusinessLogic/BusinessLogics/MessageInfoLogic.cs index 256fa73..6539fa0 100644 --- a/GarmentFactoryBusinessLogic/BusinessLogics/MessageInfoLogic.cs +++ b/GarmentFactoryBusinessLogic/BusinessLogics/MessageInfoLogic.cs @@ -61,7 +61,7 @@ namespace GarmentFactoryBusinessLogic.BusinessLogics } if (string.IsNullOrEmpty(model.SenderName)) { - throw new ArgumentNullException("Не указао почта", nameof(model.SenderName)); + throw new ArgumentNullException("Не указана почта", nameof(model.SenderName)); } if (string.IsNullOrEmpty(model.Subject)) { diff --git a/GarmentFactoryBusinessLogic/MailWorker/AbstractMailWorker.cs b/GarmentFactoryBusinessLogic/MailWorker/AbstractMailWorker.cs index f25025f..117cf6b 100644 --- a/GarmentFactoryBusinessLogic/MailWorker/AbstractMailWorker.cs +++ b/GarmentFactoryBusinessLogic/MailWorker/AbstractMailWorker.cs @@ -37,8 +37,7 @@ namespace GarmentFactoryBusinessLogic.MailWorker public async void MailSendAsync(MailSendInfoBindingModel info) { - if (string.IsNullOrEmpty(_mailLogin) || - string.IsNullOrEmpty(_mailPassword)) + if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword)) { return; } @@ -46,20 +45,17 @@ namespace GarmentFactoryBusinessLogic.MailWorker { return; } - if (string.IsNullOrEmpty(info.MailAddress) || - string.IsNullOrEmpty(info.Subject) || string.IsNullOrEmpty(info.Text)) + if (string.IsNullOrEmpty(info.MailAddress) || string.IsNullOrEmpty(info.Subject) || string.IsNullOrEmpty(info.Text)) { return; } - _logger.LogDebug("Send Mail: {To}, {Subject}", info.MailAddress, - info.Subject); + _logger.LogDebug("Send Mail: {To}, {Subject}", info.MailAddress, info.Subject); await SendMailAsync(info); } public async void MailCheck() { - if (string.IsNullOrEmpty(_mailLogin) || - string.IsNullOrEmpty(_mailPassword)) + if (string.IsNullOrEmpty(_mailLogin) || string.IsNullOrEmpty(_mailPassword)) { return; } diff --git a/GarmentFactoryClientApp/Views/Home/Mails.cshtml b/GarmentFactoryClientApp/Views/Home/Mails.cshtml index a0bf363..677575d 100644 --- a/GarmentFactoryClientApp/Views/Home/Mails.cshtml +++ b/GarmentFactoryClientApp/Views/Home/Mails.cshtml @@ -8,7 +8,7 @@
-

Заказы

+

Письма

diff --git a/GarmentFactoryClientApp/Views/Shared/_Layout.cshtml b/GarmentFactoryClientApp/Views/Shared/_Layout.cshtml index 7721d7d..5593066 100644 --- a/GarmentFactoryClientApp/Views/Shared/_Layout.cshtml +++ b/GarmentFactoryClientApp/Views/Shared/_Layout.cshtml @@ -26,7 +26,7 @@ Личные данные