diff --git a/LawFirm/AbstractLawFirmBusinessLogic/BusinessLogic/OrderLogic.cs b/LawFirm/AbstractLawFirmBusinessLogic/BusinessLogic/OrderLogic.cs index 2d4adb6..200fc13 100644 --- a/LawFirm/AbstractLawFirmBusinessLogic/BusinessLogic/OrderLogic.cs +++ b/LawFirm/AbstractLawFirmBusinessLogic/BusinessLogic/OrderLogic.cs @@ -94,7 +94,12 @@ namespace AbstractLawFirmBusinessLogic.BusinessLogic model.Status = status; if (model.Status == OrderStatus.Выдан) model.DateImplement = DateTime.Now; if (element.ImplementerId.HasValue) model.ImplementerId = element.ImplementerId; - _orderStorage.Update(model); + element = _orderStorage.Update(model); + if(element == null) + { + _logger.LogWarning("Update operation failed"); + return false; + } var clientView = _clientStorage.GetElement(new() { Id = element.ClientId }); SendEmail(clientView, element); diff --git a/LawFirm/AbstractLawFirmBusinessLogic/MailWorker/MailKitWorker.cs b/LawFirm/AbstractLawFirmBusinessLogic/MailWorker/MailKitWorker.cs index 39c4707..29b98fe 100644 --- a/LawFirm/AbstractLawFirmBusinessLogic/MailWorker/MailKitWorker.cs +++ b/LawFirm/AbstractLawFirmBusinessLogic/MailWorker/MailKitWorker.cs @@ -52,6 +52,7 @@ messageInfoLogic) : base(logger, messageInfoLogic) { } { try { + client.CheckCertificateRevocation = false; client.Connect(_popHost, _popPort, SecureSocketOptions.SslOnConnect); client.Authenticate(_mailLogin, _mailPassword); for (int i = 0; i < client.Count; i++) diff --git a/LawFirm/AbstractLawFirmClientApp/Controllers/HomeController.cs b/LawFirm/AbstractLawFirmClientApp/Controllers/HomeController.cs index 2c0da6b..1705b86 100644 --- a/LawFirm/AbstractLawFirmClientApp/Controllers/HomeController.cs +++ b/LawFirm/AbstractLawFirmClientApp/Controllers/HomeController.cs @@ -142,9 +142,8 @@ namespace AbstractLawFirmClientApp.Controllers { return Redirect("~/Home/Enter"); } - return - View(APIClient.GetRequest>($"api/client/getmessages?clientId={ APIClient.Client.Id}")); -} + return View(APIClient.GetRequest>($"api/client/getmessages?clientId={APIClient.Client.Id}")); + } } } \ No newline at end of file diff --git a/LawFirm/AbstractLawFirmClientApp/Views/Home/Mails.cshtml b/LawFirm/AbstractLawFirmClientApp/Views/Home/Mails.cshtml index 7b340d4..5f39b0c 100644 --- a/LawFirm/AbstractLawFirmClientApp/Views/Home/Mails.cshtml +++ b/LawFirm/AbstractLawFirmClientApp/Views/Home/Mails.cshtml @@ -1,51 +1,53 @@ @using AbstractLawFirmContracts.ViewModels @model List + @{ ViewData["Title"] = "Mails"; } +
-

Заказы

+

Письма

+ +
@{ if (Model == null) { -

Авторизируйтесь

+

Login bobr!

return; } - - - - - - - - - + +
- Дата письма - - Заголовок - - Текст -
+ + + + + + + + @foreach (var item in Model) { - - - - - + + + + + } - -
+ Дата + + Заголовок + + Текст +
- @Html.DisplayFor(modelItem => -item.DateDelivery) - - @Html.DisplayFor(modelItem => -item.Subject) - - @Html.DisplayFor(modelItem => -item.Body) -
+ @Html.DisplayFor(modelItem => item.DateDelivery) + + @Html.DisplayFor(modelItem => item.Subject) + + @Html.DisplayFor(modelItem => item.Body) +
+ + }
diff --git a/LawFirm/LawFirmView/Program.cs b/LawFirm/LawFirmView/Program.cs index e41d640..7accec2 100644 --- a/LawFirm/LawFirmView/Program.cs +++ b/LawFirm/LawFirmView/Program.cs @@ -46,7 +46,7 @@ namespace LawFirmView System.Configuration.ConfigurationManager.AppSettings["SmtpClientHost"] ?? string.Empty, SmtpClientPort = - Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["SmtpClient Port"]), + Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["SmtpClientPort"]), PopHost = System.Configuration.ConfigurationManager.AppSettings["PopHost"] ?? string.Empty, PopPort =