вроде готово

This commit is contained in:
antoc0der 2024-05-22 16:28:47 +04:00
parent cf26dedd92
commit e2383ee39b
3 changed files with 21 additions and 24 deletions

View File

@ -46,7 +46,7 @@ namespace FlowerShopDatabaseImplement.Models
{
Body = model.Body,
Subject = model.Subject,
ClientId = context.Clients.FirstOrDefault(x => x.Email == model.SenderName).Id,
ClientId = context.Clients.FirstOrDefault(x => x.Email == model.SenderName)?.Id,
Client = context.Clients.FirstOrDefault(x => x.Email == model.SenderName),
MessageId = model.MessageId,
SenderName = model.SenderName,

View File

@ -35,7 +35,6 @@
buttonPreveous = new Button();
buttonNext = new Button();
pageTextBox = new TextBox();
panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
((System.ComponentModel.ISupportInitialize)numericUpDownPage).BeginInit();
@ -45,8 +44,9 @@
//
panel1.Controls.Add(dataGridView);
panel1.Location = new Point(3, 1);
panel1.Margin = new Padding(3, 4, 3, 4);
panel1.Name = "panel1";
panel1.Size = new Size(696, 323);
panel1.Size = new Size(795, 431);
panel1.TabIndex = 0;
//
// dataGridView
@ -56,19 +56,19 @@
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Dock = DockStyle.Fill;
dataGridView.Location = new Point(0, 0);
dataGridView.Margin = new Padding(3, 2, 3, 2);
dataGridView.Name = "dataGridView";
dataGridView.ReadOnly = true;
dataGridView.RowHeadersWidth = 51;
dataGridView.RowTemplate.Height = 29;
dataGridView.Size = new Size(696, 323);
dataGridView.Size = new Size(795, 431);
dataGridView.TabIndex = 2;
//
// buttonOpen
//
buttonOpen.Location = new Point(705, 235);
buttonOpen.Location = new Point(806, 13);
buttonOpen.Margin = new Padding(3, 4, 3, 4);
buttonOpen.Name = "buttonOpen";
buttonOpen.Size = new Size(106, 23);
buttonOpen.Size = new Size(121, 31);
buttonOpen.TabIndex = 1;
buttonOpen.Text = "Прочитать";
buttonOpen.UseVisualStyleBackColor = true;
@ -76,19 +76,17 @@
//
// numericUpDownPage
//
numericUpDownPage.Location = new Point(705, 263);
numericUpDownPage.Margin = new Padding(3, 2, 3, 2);
numericUpDownPage.Location = new Point(806, 51);
numericUpDownPage.Name = "numericUpDownPage";
numericUpDownPage.Size = new Size(106, 23);
numericUpDownPage.Size = new Size(121, 27);
numericUpDownPage.TabIndex = 4;
numericUpDownPage.ValueChanged += numericUpDownPage_ValueChanged;
//
// buttonPreveous
//
buttonPreveous.Location = new Point(705, 289);
buttonPreveous.Margin = new Padding(3, 2, 3, 2);
buttonPreveous.Location = new Point(804, 84);
buttonPreveous.Name = "buttonPreveous";
buttonPreveous.Size = new Size(35, 25);
buttonPreveous.Size = new Size(40, 33);
buttonPreveous.TabIndex = 5;
buttonPreveous.Text = "<-";
buttonPreveous.UseVisualStyleBackColor = true;
@ -96,10 +94,9 @@
//
// buttonNext
//
buttonNext.Location = new Point(776, 289);
buttonNext.Margin = new Padding(3, 2, 3, 2);
buttonNext.Location = new Point(883, 84);
buttonNext.Name = "buttonNext";
buttonNext.Size = new Size(35, 25);
buttonNext.Size = new Size(40, 33);
buttonNext.TabIndex = 6;
buttonNext.Text = "->";
buttonNext.UseVisualStyleBackColor = true;
@ -108,26 +105,26 @@
// pageTextBox
//
pageTextBox.Enabled = false;
pageTextBox.Location = new Point(746, 289);
pageTextBox.Location = new Point(850, 90);
pageTextBox.Margin = new Padding(3, 4, 3, 4);
pageTextBox.Name = "pageTextBox";
pageTextBox.ReadOnly = true;
pageTextBox.Size = new Size(24, 23);
pageTextBox.Size = new Size(27, 27);
pageTextBox.TabIndex = 7;
pageTextBox.Text = "0";
//
// ViewMailForm
// FormViewMail
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(817, 321);
ClientSize = new Size(934, 428);
Controls.Add(pageTextBox);
Controls.Add(buttonNext);
Controls.Add(buttonPreveous);
Controls.Add(numericUpDownPage);
Controls.Add(buttonOpen);
Controls.Add(panel1);
Margin = new Padding(3, 2, 3, 2);
Name = "ViewMailForm";
Name = "FormViewMail";
Text = "Письма";
Load += ViewMailForm_Load;
panel1.ResumeLayout(false);

View File

@ -56,7 +56,7 @@ namespace ProjectFlowerShop
});
var timer = new System.Threading.Timer(new
TimerCallback(MailCheck!), null, 0, 100000);
TimerCallback(MailCheck!), null, 0, 10000);
}
catch (Exception ex)
{