merge fix 4 to five
This commit is contained in:
commit
b86b3ca114
2
SecuritySystem/FormMain.Designer.cs
generated
2
SecuritySystem/FormMain.Designer.cs
generated
@ -90,7 +90,7 @@
|
|||||||
//
|
//
|
||||||
componentListToolStripMenuItem.Name = "componentListToolStripMenuItem";
|
componentListToolStripMenuItem.Name = "componentListToolStripMenuItem";
|
||||||
componentListToolStripMenuItem.Size = new Size(218, 22);
|
componentListToolStripMenuItem.Size = new Size(218, 22);
|
||||||
componentListToolStripMenuItem.Text = "Список Компонентов";
|
componentListToolStripMenuItem.Text = "Список изделий";
|
||||||
componentListToolStripMenuItem.Click += ComponentListToolStripMenuItem_Click;
|
componentListToolStripMenuItem.Click += ComponentListToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// componentsSecureToolStripMenuItem
|
// componentsSecureToolStripMenuItem
|
||||||
|
@ -74,6 +74,7 @@ namespace SecuritySystemView
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
|
||||||
_logic.SaveOrdersToPdfFile(new ReportBindingModel
|
_logic.SaveOrdersToPdfFile(new ReportBindingModel
|
||||||
{
|
{
|
||||||
FileName = dialog.FileName,
|
FileName = dialog.FileName,
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -87,8 +87,8 @@ namespace SecureCompanyBusinessLogic.BusinessLogics
|
|||||||
_saveToWord.CreateDoc(new WordInfo
|
_saveToWord.CreateDoc(new WordInfo
|
||||||
{
|
{
|
||||||
FileName = model.FileName,
|
FileName = model.FileName,
|
||||||
Title = "Список компонент",
|
Title = "Список изделий",
|
||||||
Secures = _Securestorage.GetFullList()
|
Secures = _SecureStorage.GetFullList()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ namespace SecureCompanyBusinessLogic.BusinessLogics
|
|||||||
_saveToExcel.CreateReport(new ExcelInfo
|
_saveToExcel.CreateReport(new ExcelInfo
|
||||||
{
|
{
|
||||||
FileName = model.FileName,
|
FileName = model.FileName,
|
||||||
Title = "Список компонент",
|
Title = "Список изделий-компонентов",
|
||||||
SecureComponents = GetSecureComponent()
|
SecureComponents = GetSecureComponent()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -12,8 +12,13 @@ using SecuritySystemDatabaseImplement;
|
|||||||
namespace SecuritySystemDatabaseImplement.Migrations
|
namespace SecuritySystemDatabaseImplement.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(SecuritySystemDatabase))]
|
[DbContext(typeof(SecuritySystemDatabase))]
|
||||||
|
<<<<<<<< HEAD:SecuritySystemDatabaseImplement/Migrations/20230423054524_with client.Designer.cs
|
||||||
[Migration("20230423054524_with client")]
|
[Migration("20230423054524_with client")]
|
||||||
partial class withclient
|
partial class withclient
|
||||||
|
========
|
||||||
|
[Migration("20230502080047_lab4")]
|
||||||
|
partial class lab4
|
||||||
|
>>>>>>>> origin/Lab_Work_4:SecuritySystemDatabaseImplement/Migrations/20230502080047_lab4.Designer.cs
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
@ -7,7 +7,11 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||||||
namespace SecuritySystemDatabaseImplement.Migrations
|
namespace SecuritySystemDatabaseImplement.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
<<<<<<<< HEAD:SecuritySystemDatabaseImplement/Migrations/20230423054524_with client.cs
|
||||||
public partial class withclient : Migration
|
public partial class withclient : Migration
|
||||||
|
========
|
||||||
|
public partial class lab4 : Migration
|
||||||
|
>>>>>>>> origin/Lab_Work_4:SecuritySystemDatabaseImplement/Migrations/20230502080047_lab4.cs
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
219
SecuritySystemDatabaseImplement/Migrations/20230502080047_lab4.Designer.cs
generated
Normal file
219
SecuritySystemDatabaseImplement/Migrations/20230502080047_lab4.Designer.cs
generated
Normal file
@ -0,0 +1,219 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
using SecuritySystemDatabaseImplement;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace SecuritySystemDatabaseImplement.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(SecuritySystemDatabase))]
|
||||||
|
<<<<<<<< HEAD:SecuritySystemDatabaseImplement/Migrations/20230423054524_with client.Designer.cs
|
||||||
|
[Migration("20230423054524_with client")]
|
||||||
|
partial class withclient
|
||||||
|
========
|
||||||
|
[Migration("20230502080047_lab4")]
|
||||||
|
partial class lab4
|
||||||
|
>>>>>>>> origin/Lab_Work_4:SecuritySystemDatabaseImplement/Migrations/20230502080047_lab4.Designer.cs
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "7.0.4")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.Client", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClientFIO")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Clients");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.Component", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ComponentName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<double>("Cost")
|
||||||
|
.HasColumnType("double precision");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Components");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.Order", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("ClientId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("Count")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DateCreate")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DateImplement")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
b.Property<int>("SecureId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("Status")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<double>("Sum")
|
||||||
|
.HasColumnType("double precision");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
|
b.HasIndex("SecureId");
|
||||||
|
|
||||||
|
b.ToTable("Orders");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.Secure", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<double>("Price")
|
||||||
|
.HasColumnType("double precision");
|
||||||
|
|
||||||
|
b.Property<string>("SecureName")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Secures");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.SecureComponent", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("ComponentId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("Count")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("SecureId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ComponentId");
|
||||||
|
|
||||||
|
b.HasIndex("SecureId");
|
||||||
|
|
||||||
|
b.ToTable("SecureComponents");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.Order", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("SecuritySystemDatabaseImplement.Models.Client", "Client")
|
||||||
|
.WithMany("Orders")
|
||||||
|
.HasForeignKey("ClientId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("SecuritySystemDatabaseImplement.Models.Secure", "Secure")
|
||||||
|
.WithMany("Orders")
|
||||||
|
.HasForeignKey("SecureId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Client");
|
||||||
|
|
||||||
|
b.Navigation("Secure");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.SecureComponent", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("SecuritySystemDatabaseImplement.Models.Component", "Component")
|
||||||
|
.WithMany("SecureComponents")
|
||||||
|
.HasForeignKey("ComponentId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("SecuritySystemDatabaseImplement.Models.Secure", "Secure")
|
||||||
|
.WithMany("Components")
|
||||||
|
.HasForeignKey("SecureId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Component");
|
||||||
|
|
||||||
|
b.Navigation("Secure");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.Client", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Orders");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.Component", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("SecureComponents");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("SecuritySystemDatabaseImplement.Models.Secure", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Components");
|
||||||
|
|
||||||
|
b.Navigation("Orders");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,160 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace SecuritySystemDatabaseImplement.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
<<<<<<<< HEAD:SecuritySystemDatabaseImplement/Migrations/20230423054524_with client.cs
|
||||||
|
public partial class withclient : Migration
|
||||||
|
========
|
||||||
|
public partial class lab4 : Migration
|
||||||
|
>>>>>>>> origin/Lab_Work_4:SecuritySystemDatabaseImplement/Migrations/20230502080047_lab4.cs
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Clients",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
ClientFIO = table.Column<string>(type: "text", nullable: false),
|
||||||
|
Email = table.Column<string>(type: "text", nullable: false),
|
||||||
|
Password = table.Column<string>(type: "text", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Clients", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Components",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
ComponentName = table.Column<string>(type: "text", nullable: false),
|
||||||
|
Cost = table.Column<double>(type: "double precision", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Components", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Secures",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
SecureName = table.Column<string>(type: "text", nullable: false),
|
||||||
|
Price = table.Column<double>(type: "double precision", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Secures", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Orders",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
SecureId = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
ClientId = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
Count = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
Sum = table.Column<double>(type: "double precision", nullable: false),
|
||||||
|
Status = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
DateCreate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||||
|
DateImplement = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Orders", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Orders_Clients_ClientId",
|
||||||
|
column: x => x.ClientId,
|
||||||
|
principalTable: "Clients",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Orders_Secures_SecureId",
|
||||||
|
column: x => x.SecureId,
|
||||||
|
principalTable: "Secures",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "SecureComponents",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
SecureId = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
ComponentId = table.Column<int>(type: "integer", nullable: false),
|
||||||
|
Count = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_SecureComponents", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_SecureComponents_Components_ComponentId",
|
||||||
|
column: x => x.ComponentId,
|
||||||
|
principalTable: "Components",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_SecureComponents_Secures_SecureId",
|
||||||
|
column: x => x.SecureId,
|
||||||
|
principalTable: "Secures",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Orders_ClientId",
|
||||||
|
table: "Orders",
|
||||||
|
column: "ClientId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Orders_SecureId",
|
||||||
|
table: "Orders",
|
||||||
|
column: "SecureId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_SecureComponents_ComponentId",
|
||||||
|
table: "SecureComponents",
|
||||||
|
column: "ComponentId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_SecureComponents_SecureId",
|
||||||
|
table: "SecureComponents",
|
||||||
|
column: "SecureId");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Orders");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "SecureComponents");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Clients");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Components");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Secures");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user