лаба готова
This commit is contained in:
parent
b50a4d17eb
commit
1d7edb7679
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
@ -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)
|
||||
{
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user