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

@ -20,45 +20,59 @@
base.Dispose(disposing); base.Dispose(disposing);
} }
#region Windows Form Designer generated code #region Windows Form Designer generated code
/// <summary> /// <summary>
/// Required method for Designer support - do not modify /// Required method for Designer support - do not modify
/// the contents of this method with the code editor. /// the contents of this method with the code editor.
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
dataGridView = new DataGridView(); dataGridView = new DataGridView();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); buttonRef = new Button();
SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
// SuspendLayout();
// dataGridView //
// // dataGridView
dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; //
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
dataGridView.Location = new Point(-2, -1); dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Margin = new Padding(3, 4, 3, 4); dataGridView.Location = new Point(-2, -1);
dataGridView.Name = "dataGridView"; dataGridView.Margin = new Padding(3, 4, 3, 4);
dataGridView.ReadOnly = true; dataGridView.Name = "dataGridView";
dataGridView.RowHeadersWidth = 51; dataGridView.ReadOnly = true;
dataGridView.RowTemplate.Height = 24; dataGridView.RowHeadersWidth = 51;
dataGridView.Size = new Size(931, 517); dataGridView.RowTemplate.Height = 24;
dataGridView.TabIndex = 10; dataGridView.Size = new Size(962, 517);
// dataGridView.TabIndex = 10;
// FormMails //
// // buttonRef
AutoScaleDimensions = new SizeF(8F, 19F); //
AutoScaleMode = AutoScaleMode.Font; buttonRef.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
ClientSize = new Size(929, 515); buttonRef.Location = new Point(966, 233);
Controls.Add(dataGridView); buttonRef.Name = "buttonRef";
Name = "FormMails"; buttonRef.Size = new Size(118, 28);
Text = "FormMails"; buttonRef.TabIndex = 11;
Load += FormMail_Load; buttonRef.Text = "Обновить";
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); buttonRef.UseVisualStyleBackColor = true;
ResumeLayout(false); 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 #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"