diff --git a/FishFactory/App.config b/FishFactory/App.config index 9d9e31c..6f47cce 100644 --- a/FishFactory/App.config +++ b/FishFactory/App.config @@ -1,9 +1,9 @@  - + - + diff --git a/FishFactory/FishFactory.csproj b/FishFactory/FishFactory.csproj index d2c10da..8e250dc 100644 --- a/FishFactory/FishFactory.csproj +++ b/FishFactory/FishFactory.csproj @@ -42,6 +42,9 @@ + + Always + Always diff --git a/FishFactory/Forms/FormMails.Designer.cs b/FishFactory/Forms/FormMails.Designer.cs index a49142f..c02e379 100644 --- a/FishFactory/Forms/FormMails.Designer.cs +++ b/FishFactory/Forms/FormMails.Designer.cs @@ -20,45 +20,59 @@ base.Dispose(disposing); } - #region Windows Form Designer generated code + #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - dataGridView = new DataGridView(); - ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); - SuspendLayout(); - // - // dataGridView - // - dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; - dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView.Location = new Point(-2, -1); - dataGridView.Margin = new Padding(3, 4, 3, 4); - dataGridView.Name = "dataGridView"; - dataGridView.ReadOnly = true; - dataGridView.RowHeadersWidth = 51; - dataGridView.RowTemplate.Height = 24; - dataGridView.Size = new Size(931, 517); - dataGridView.TabIndex = 10; - // - // FormMails - // - AutoScaleDimensions = new SizeF(8F, 19F); - AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(929, 515); - Controls.Add(dataGridView); - Name = "FormMails"; - Text = "FormMails"; - Load += FormMail_Load; - ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); - ResumeLayout(false); - } + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + dataGridView = new DataGridView(); + buttonRef = new Button(); + ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); + SuspendLayout(); + // + // dataGridView + // + dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView.Location = new Point(-2, -1); + dataGridView.Margin = new Padding(3, 4, 3, 4); + dataGridView.Name = "dataGridView"; + dataGridView.ReadOnly = true; + dataGridView.RowHeadersWidth = 51; + dataGridView.RowTemplate.Height = 24; + dataGridView.Size = new Size(962, 517); + dataGridView.TabIndex = 10; + // + // buttonRef + // + buttonRef.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + buttonRef.Location = new Point(966, 233); + buttonRef.Name = "buttonRef"; + buttonRef.Size = new Size(118, 28); + buttonRef.TabIndex = 11; + buttonRef.Text = "Обновить"; + buttonRef.UseVisualStyleBackColor = true; + buttonRef.Click += buttonRef_Click; + // + // FormMails + // + AutoScaleDimensions = new SizeF(8F, 19F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(1084, 515); + Controls.Add(buttonRef); + Controls.Add(dataGridView); + Name = "FormMails"; + Text = "FormMails"; + Load += FormMail_Load; + ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); + ResumeLayout(false); + } - #endregion - private DataGridView dataGridView; - } + #endregion + private DataGridView dataGridView; + private Button buttonRef; + } } \ No newline at end of file diff --git a/FishFactoryBusinessLogic/BusinessLogic/OrderLogic.cs b/FishFactoryBusinessLogic/BusinessLogic/OrderLogic.cs index 4cfe56e..ca2a6a9 100644 --- a/FishFactoryBusinessLogic/BusinessLogic/OrderLogic.cs +++ b/FishFactoryBusinessLogic/BusinessLogic/OrderLogic.cs @@ -73,7 +73,7 @@ namespace FishFactoryBusinessLogic.BusinessLogic { MailAddress = order.ClientEmail, Subject = $"Новый заказ создан. Номер заказа - {order.Id}", - Text = $"Ваш заказ номер {order.Id} на текстиль {order.CannedName} от {order.DateCreate} на сумму {order.Sum} принят." + Text = $"Ваш заказ номер {order.Id} на консерву {order.CannedName} от {order.DateCreate} на сумму {order.Sum} принят." })); return true; diff --git a/FishFactoryBusinessLogic/MailWorker/AbstractMailWorker.cs b/FishFactoryBusinessLogic/MailWorker/AbstractMailWorker.cs index cbf42a9..a13edb6 100644 --- a/FishFactoryBusinessLogic/MailWorker/AbstractMailWorker.cs +++ b/FishFactoryBusinessLogic/MailWorker/AbstractMailWorker.cs @@ -68,6 +68,7 @@ namespace FishFactoryBusinessLogic.MailWorker } var list = await ReceiveMailAsync(); _logger.LogDebug("Check Mail: {Count} new mails", list.Count); + foreach (var mail in list) { _messageInfoLogic.Create(mail); diff --git a/FishFactoryRestApi/Controllers/ClientController.cs b/FishFactoryRestApi/Controllers/ClientController.cs index 662b2d1..09a6615 100644 --- a/FishFactoryRestApi/Controllers/ClientController.cs +++ b/FishFactoryRestApi/Controllers/ClientController.cs @@ -74,7 +74,7 @@ namespace FishFactoryRestApi.Controllers } catch (Exception ex) { - _logger.LogError(ex, "Îøèáêà ïîëó÷åíèÿ ïèñåì êëèåíòà"); + _logger.LogError(ex, "Ошо"); throw; } } diff --git a/FishFactoryRestApi/appsettings.json b/FishFactoryRestApi/appsettings.json index 36a9d4e..5d516db 100644 --- a/FishFactoryRestApi/appsettings.json +++ b/FishFactoryRestApi/appsettings.json @@ -7,9 +7,9 @@ }, "AllowedHosts": "*", - "SmtpClientHost": "smtp.gmail.com", + "SmtpClientHost": "smtp.yandex.ru", "SmtpClientPort": "587", - "PopHost": "pop.gmail.com", + "PopHost": "pop.yandex.ru", "PopPort": "995", "MailLogin": "iskander044ya@yandex.ru", "MailPassword": "aakjmhccsmlkkisn"