7 готовая

This commit is contained in:
dex_moth 2024-06-16 14:32:38 +04:00
parent ac51c61cf0
commit 9cfd6b1b6f
7 changed files with 63 additions and 45 deletions

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<configuration> <configuration>
<appSettings> <appSettings>
<add key="SmtpClientHost" value="smtp.gmail.com" /> <add key="SmtpClientHost" value="smtp.yandex.ru" />
<add key="SmtpClientPort" value="587" /> <add key="SmtpClientPort" value="587" />
<add key="PopHost" value="pop.gmail.com" /> <add key="PopHost" value="pop.yandex.ru" />
<add key="PopPort" value="995" /> <add key="PopPort" value="995" />
<add key="MailLogin" value="iskander044ya@yandex.ru" /> <add key="MailLogin" value="iskander044ya@yandex.ru" />
<add key="MailPassword" value="aakjmhccsmlkkisn" /> <add key="MailPassword" value="aakjmhccsmlkkisn" />

View File

@ -42,6 +42,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Update="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ReportOrders.rdlc"> <None Update="ReportOrders.rdlc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>

View File

@ -29,6 +29,7 @@
private void InitializeComponent() private void InitializeComponent()
{ {
dataGridView = new DataGridView(); dataGridView = new DataGridView();
buttonRef = new Button();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout(); SuspendLayout();
// //
@ -42,14 +43,26 @@
dataGridView.ReadOnly = true; dataGridView.ReadOnly = true;
dataGridView.RowHeadersWidth = 51; dataGridView.RowHeadersWidth = 51;
dataGridView.RowTemplate.Height = 24; dataGridView.RowTemplate.Height = 24;
dataGridView.Size = new Size(931, 517); dataGridView.Size = new Size(962, 517);
dataGridView.TabIndex = 10; 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 // FormMails
// //
AutoScaleDimensions = new SizeF(8F, 19F); AutoScaleDimensions = new SizeF(8F, 19F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(929, 515); ClientSize = new Size(1084, 515);
Controls.Add(buttonRef);
Controls.Add(dataGridView); Controls.Add(dataGridView);
Name = "FormMails"; Name = "FormMails";
Text = "FormMails"; Text = "FormMails";
@ -60,5 +73,6 @@
#endregion #endregion
private DataGridView dataGridView; private DataGridView dataGridView;
private Button buttonRef;
} }
} }

View File

@ -73,7 +73,7 @@ namespace FishFactoryBusinessLogic.BusinessLogic
{ {
MailAddress = order.ClientEmail, MailAddress = order.ClientEmail,
Subject = $"Новый заказ создан. Номер заказа - {order.Id}", Subject = $"Новый заказ создан. Номер заказа - {order.Id}",
Text = $"Ваш заказ номер {order.Id} на текстиль {order.CannedName} от {order.DateCreate} на сумму {order.Sum} принят." Text = $"Ваш заказ номер {order.Id} на консерву {order.CannedName} от {order.DateCreate} на сумму {order.Sum} принят."
})); }));
return true; return true;

View File

@ -68,6 +68,7 @@ namespace FishFactoryBusinessLogic.MailWorker
} }
var list = await ReceiveMailAsync(); var list = await ReceiveMailAsync();
_logger.LogDebug("Check Mail: {Count} new mails", list.Count); _logger.LogDebug("Check Mail: {Count} new mails", list.Count);
foreach (var mail in list) foreach (var mail in list)
{ {
_messageInfoLogic.Create(mail); _messageInfoLogic.Create(mail);

View File

@ -74,7 +74,7 @@ namespace FishFactoryRestApi.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "Îøèáêà ïîëó÷åíèÿ ïèñåì êëèåíòà"); _logger.LogError(ex, "Ошо");
throw; throw;
} }
} }

View File

@ -7,9 +7,9 @@
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"SmtpClientHost": "smtp.gmail.com", "SmtpClientHost": "smtp.yandex.ru",
"SmtpClientPort": "587", "SmtpClientPort": "587",
"PopHost": "pop.gmail.com", "PopHost": "pop.yandex.ru",
"PopPort": "995", "PopPort": "995",
"MailLogin": "iskander044ya@yandex.ru", "MailLogin": "iskander044ya@yandex.ru",
"MailPassword": "aakjmhccsmlkkisn" "MailPassword": "aakjmhccsmlkkisn"