From a559755d90d87a4d15f09deead130ddcd422eff1 Mon Sep 17 00:00:00 2001 From: dimazhelovanov Date: Mon, 24 Apr 2023 10:10:36 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BlacksmithWorkshop/BlacksmithWorkshop/FormMails.Designer.cs | 1 + BlacksmithWorkshop/BlacksmithWorkshop/FormMails.cs | 5 +++++ BlacksmithWorkshop/BlacksmithWorkshop/Program.cs | 2 +- .../Controllers/HomeController.cs | 2 +- .../BlacksmithWorkshopRestApi/Controllers/MainController.cs | 3 ++- .../BlacksmithWorkshopRestApi/appsettings.json | 5 +++-- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMails.Designer.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMails.Designer.cs index f7b64aa..2b1ba02 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMails.Designer.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMails.Designer.cs @@ -50,6 +50,7 @@ Controls.Add(dataGridView); Name = "FormMails"; Text = "Сообщения"; + Load += FormMails_Load; ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); ResumeLayout(false); } diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/FormMails.cs b/BlacksmithWorkshop/BlacksmithWorkshop/FormMails.cs index 7045e30..adc6a93 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/FormMails.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/FormMails.cs @@ -48,5 +48,10 @@ namespace BlacksmithWorkshop MessageBoxIcon.Error); } } + + private void FormMails_Load(object sender, EventArgs e) + { + LoadData(); + } } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/Program.cs b/BlacksmithWorkshop/BlacksmithWorkshop/Program.cs index bfc515d..84f5497 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshop/Program.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshop/Program.cs @@ -42,7 +42,7 @@ namespace BlacksmithWorkshop }); // - var timer = new System.Threading.Timer(new TimerCallback(MailCheck!), null, 0, 100000); + var timer = new System.Threading.Timer(new TimerCallback(MailCheck!), null, 0, 100); } catch (Exception ex) { diff --git a/BlacksmithWorkshop/BlacksmithWorkshopClientApp/Controllers/HomeController.cs b/BlacksmithWorkshop/BlacksmithWorkshopClientApp/Controllers/HomeController.cs index e942df2..876ca94 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopClientApp/Controllers/HomeController.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopClientApp/Controllers/HomeController.cs @@ -159,7 +159,7 @@ namespace BlacksmithWorkshopClientApp.Controllers return Redirect("~/Home/Enter"); } return - View(APIClient.GetRequest>($"api/client/getmessages?clientId ={ APIClient.Client.Id}")); + View(APIClient.GetRequest>($"api/client/getmessages?clientId ={APIClient.Client.Id}")); } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshopRestApi/Controllers/MainController.cs b/BlacksmithWorkshop/BlacksmithWorkshopRestApi/Controllers/MainController.cs index 431c91f..0116c7f 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopRestApi/Controllers/MainController.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopRestApi/Controllers/MainController.cs @@ -70,7 +70,8 @@ namespace BlacksmithWorkshopRestApi.Controllers throw; } } - [HttpPost] + + [HttpPost] public void CreateOrder(OrderBindingModel model) { try diff --git a/BlacksmithWorkshop/BlacksmithWorkshopRestApi/appsettings.json b/BlacksmithWorkshop/BlacksmithWorkshopRestApi/appsettings.json index 5990d80..da85af4 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopRestApi/appsettings.json +++ b/BlacksmithWorkshop/BlacksmithWorkshopRestApi/appsettings.json @@ -6,12 +6,13 @@ } }, "AllowedHosts": "*", + "SmtpClientHost": "smtp.gmail.com", "SmtpClientPort": "587", "PopHost": "pop.gmail.com", "PopPort": "995", - "MailLogin": "labwork15kafis@gmail.com", - "MailPassword": "passlab15" + "MailLogin": "lab7rpp@gmail.com", + "MailPassword": "bvac xppu dkze ppcr" }