лаба готова

This commit is contained in:
Леонид Малафеев 2024-05-05 19:37:06 +04:00
parent b50a4d17eb
commit 1d7edb7679
5 changed files with 88 additions and 88 deletions

View File

@ -46,7 +46,7 @@ namespace JewelryStoreDatabaseImplement.Implements
using var context = new JewelryStoreDatabase();
model.ClientId = context.Clients.FirstOrDefault(x => x.Email.Equals(model.SenderName))?.Id;
var message = MessageInfo.Create(model);
if (message == null || context.Messages.Any(x => x.MessageId.Equals(model.MessageId)))
if (message == null || context.Messages.Any(x => x.MessageId.Equals(model.MessageId)) || message.Body == null)
{
return null;
}

View File

@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace JewelryStoreDatabaseImplement.Migrations
{
[DbContext(typeof(JewelryStoreDatabase))]
[Migration("20240505145919_messagePJneLOMAY")]
partial class messagePJneLOMAY
[Migration("20240505150828_messagePJneLOMAYgg")]
partial class messagePJneLOMAYgg
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{

View File

@ -6,7 +6,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace JewelryStoreDatabaseImplement.Migrations
{
public partial class messagePJneLOMAY : Migration
public partial class messagePJneLOMAYgg : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{

View File

@ -48,7 +48,7 @@
ClientSize = new Size(800, 450);
Controls.Add(dataGridView);
Name = "FormMails";
Text = "FormMails";
Text = "Письма";
Load += FormMails_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false);