Compare commits
3 Commits
8cf0e3d114
...
5f8c7773b5
Author | SHA1 | Date | |
---|---|---|---|
|
5f8c7773b5 | ||
|
7e61baddbf | ||
|
e22020f8ab |
@ -12,7 +12,7 @@ using PlumbingRepairDatabaseImplement;
|
||||
namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlumbingRepairDatabase))]
|
||||
[Migration("20240515153909_InitCreate")]
|
||||
[Migration("20240517111715_InitCreate")]
|
||||
partial class InitCreate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@ -127,6 +127,8 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
|
||||
b.HasKey("MessageId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Messages");
|
||||
});
|
||||
|
||||
@ -272,6 +274,15 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
b.ToTable("WorkComponents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PlumbingRepairDatabaseImplement.Models.MessageInfo", b =>
|
||||
{
|
||||
b.HasOne("PlumbingRepairDatabaseImplement.Models.Client", "Client")
|
||||
.WithMany("Messages")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PlumbingRepairDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.HasOne("PlumbingRepairDatabaseImplement.Models.Client", "Client")
|
||||
@ -337,6 +348,8 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
|
||||
modelBuilder.Entity("PlumbingRepairDatabaseImplement.Models.Client", b =>
|
||||
{
|
||||
b.Navigation("Messages");
|
||||
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
@ -54,24 +54,6 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
table.PrimaryKey("PK_Implementers", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Messages",
|
||||
columns: table => new
|
||||
{
|
||||
MessageId = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
||||
ClientId = table.Column<int>(type: "int", nullable: true),
|
||||
SenderName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
DateDelivery = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Subject = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Body = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
IsRead = table.Column<bool>(type: "bit", nullable: false),
|
||||
ReplyText = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Messages", x => x.MessageId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Shops",
|
||||
columns: table => new
|
||||
@ -102,6 +84,29 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
table.PrimaryKey("PK_Works", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Messages",
|
||||
columns: table => new
|
||||
{
|
||||
MessageId = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
||||
ClientId = table.Column<int>(type: "int", nullable: true),
|
||||
SenderName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
DateDelivery = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
Subject = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Body = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
IsRead = table.Column<bool>(type: "bit", nullable: false),
|
||||
ReplyText = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Messages", x => x.MessageId);
|
||||
table.ForeignKey(
|
||||
name: "FK_Messages_Clients_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "Clients",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Orders",
|
||||
columns: table => new
|
||||
@ -193,6 +198,11 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Messages_ClientId",
|
||||
table: "Messages",
|
||||
column: "ClientId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Orders_ClientId",
|
||||
table: "Orders",
|
@ -125,6 +125,8 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
|
||||
b.HasKey("MessageId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("Messages");
|
||||
});
|
||||
|
||||
@ -270,6 +272,15 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
b.ToTable("WorkComponents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PlumbingRepairDatabaseImplement.Models.MessageInfo", b =>
|
||||
{
|
||||
b.HasOne("PlumbingRepairDatabaseImplement.Models.Client", "Client")
|
||||
.WithMany("Messages")
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.Navigation("Client");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PlumbingRepairDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.HasOne("PlumbingRepairDatabaseImplement.Models.Client", "Client")
|
||||
@ -335,6 +346,8 @@ namespace PlumbingRepairDatabaseImplement.Migrations
|
||||
|
||||
modelBuilder.Entity("PlumbingRepairDatabaseImplement.Models.Client", b =>
|
||||
{
|
||||
b.Navigation("Messages");
|
||||
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
||||
|
@ -35,6 +35,8 @@ namespace PlumbingRepairDatabaseImplement.Models
|
||||
|
||||
public virtual Client? Client { get; set; }
|
||||
|
||||
public virtual Client? Client { get; private set; }
|
||||
|
||||
public static MessageInfo? Create(MessageInfoBindingModel model)
|
||||
{
|
||||
if (model == null)
|
||||
|
@ -30,9 +30,9 @@
|
||||
{
|
||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
||||
this.panel = new System.Windows.Forms.Panel();
|
||||
this.buttonOpen = new System.Windows.Forms.Button();
|
||||
this.buttonForward = new System.Windows.Forms.Button();
|
||||
this.buttonBack = new System.Windows.Forms.Button();
|
||||
this.buttonOpen = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.panel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@ -54,7 +54,6 @@
|
||||
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dataGridView.Size = new System.Drawing.Size(956, 455);
|
||||
this.dataGridView.TabIndex = 7;
|
||||
this.dataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellContentClick);
|
||||
//
|
||||
// panel
|
||||
//
|
||||
@ -67,16 +66,6 @@
|
||||
this.panel.Size = new System.Drawing.Size(183, 455);
|
||||
this.panel.TabIndex = 8;
|
||||
//
|
||||
// buttonOpen
|
||||
//
|
||||
this.buttonOpen.Location = new System.Drawing.Point(14, 12);
|
||||
this.buttonOpen.Name = "buttonOpen";
|
||||
this.buttonOpen.Size = new System.Drawing.Size(157, 34);
|
||||
this.buttonOpen.TabIndex = 0;
|
||||
this.buttonOpen.Text = "Открыть";
|
||||
this.buttonOpen.UseVisualStyleBackColor = true;
|
||||
this.buttonOpen.Click += new System.EventHandler(this.ButtonOpen_Click);
|
||||
//
|
||||
// buttonForward
|
||||
//
|
||||
this.buttonForward.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
@ -99,6 +88,16 @@
|
||||
this.buttonBack.UseVisualStyleBackColor = true;
|
||||
this.buttonBack.Click += new System.EventHandler(this.ButtonBack_Click);
|
||||
//
|
||||
// buttonOpen
|
||||
//
|
||||
this.buttonOpen.Location = new System.Drawing.Point(14, 12);
|
||||
this.buttonOpen.Name = "buttonOpen";
|
||||
this.buttonOpen.Size = new System.Drawing.Size(157, 34);
|
||||
this.buttonOpen.TabIndex = 0;
|
||||
this.buttonOpen.Text = "Открыть";
|
||||
this.buttonOpen.UseVisualStyleBackColor = true;
|
||||
this.buttonOpen.Click += new System.EventHandler(this.ButtonOpen_Click);
|
||||
//
|
||||
// FormMails
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
|
||||
|
@ -54,10 +54,5 @@ namespace PlumbingRepairView
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user