вроде все работает, что касается десктопного приложения (кроме имитации запуска работ :) )
This commit is contained in:
parent
c60b75d443
commit
c7e3340693
6
SushiBar/FormImplementers.Designer.cs
generated
6
SushiBar/FormImplementers.Designer.cs
generated
@ -52,6 +52,7 @@
|
||||
//
|
||||
// buttonAdd
|
||||
//
|
||||
buttonAdd.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonAdd.Location = new Point(801, 34);
|
||||
buttonAdd.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonAdd.Name = "buttonAdd";
|
||||
@ -63,6 +64,7 @@
|
||||
//
|
||||
// buttonUpdate
|
||||
//
|
||||
buttonUpdate.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
buttonUpdate.Location = new Point(801, 160);
|
||||
buttonUpdate.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonUpdate.Name = "buttonUpdate";
|
||||
@ -74,6 +76,7 @@
|
||||
//
|
||||
// buttonDelete
|
||||
//
|
||||
buttonDelete.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
buttonDelete.Location = new Point(801, 282);
|
||||
buttonDelete.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonDelete.Name = "buttonDelete";
|
||||
@ -85,6 +88,7 @@
|
||||
//
|
||||
// buttonRefresh
|
||||
//
|
||||
buttonRefresh.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
buttonRefresh.Location = new Point(801, 407);
|
||||
buttonRefresh.Margin = new Padding(4, 3, 4, 3);
|
||||
buttonRefresh.Name = "buttonRefresh";
|
||||
@ -99,7 +103,7 @@
|
||||
AutoScaleDimensions = new SizeF(10F, 22F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
BackColor = Color.MediumOrchid;
|
||||
ClientSize = new Size(1000, 495);
|
||||
ClientSize = new Size(1018, 495);
|
||||
Controls.Add(buttonRefresh);
|
||||
Controls.Add(buttonDelete);
|
||||
Controls.Add(buttonUpdate);
|
||||
|
@ -33,6 +33,7 @@ namespace SushiBarView
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void buttonUpdate_Click(object sender, EventArgs e)
|
||||
|
@ -11,7 +11,7 @@ namespace SushiBarContracts.ViewModels
|
||||
public class ImplementerViewModel : IImplementerModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("ИсполнительФИО")]
|
||||
[DisplayName("Исполнитель ФИО")]
|
||||
public string ImplementerFIO { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Пароль")]
|
||||
|
@ -12,7 +12,7 @@ using SushiBarDatabaseImplement;
|
||||
namespace SushiBarDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(SushiBarDatabase))]
|
||||
[Migration("20240406182026_InitCreate")]
|
||||
[Migration("20240420174458_InitCreate")]
|
||||
partial class InitCreate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@ -70,6 +70,33 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
b.ToTable("Components");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Implementer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ImplementerFIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Qualification")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkExperience")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Implementers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -90,6 +117,10 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
b.Property<DateTime?>("DateImplement")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("ImplementerId")
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
@ -103,6 +134,8 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("ImplementerId");
|
||||
|
||||
b.HasIndex("SushiId");
|
||||
|
||||
b.ToTable("Orders");
|
||||
@ -162,6 +195,12 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SushiBarDatabaseImplement.Models.Implementer", "Implementer")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("ImplementerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SushiBarDatabaseImplement.Models.Sushi", "Sushi")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("SushiId")
|
||||
@ -170,6 +209,8 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
|
||||
b.Navigation("Client");
|
||||
|
||||
b.Navigation("Implementer");
|
||||
|
||||
b.Navigation("Sushi");
|
||||
});
|
||||
|
||||
@ -202,6 +243,11 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
b.Navigation("SushiComponents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Implementer", b =>
|
||||
{
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Sushi", b =>
|
||||
{
|
||||
b.Navigation("Components");
|
@ -40,6 +40,22 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
table.PrimaryKey("PK_Components", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Implementers",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ImplementerFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Password = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
WorkExperience = table.Column<int>(type: "int", nullable: false),
|
||||
Qualification = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Implementers", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sushis",
|
||||
columns: table => new
|
||||
@ -62,6 +78,7 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
SushiId = table.Column<int>(type: "int", nullable: false),
|
||||
ClientId = table.Column<int>(type: "int", nullable: false),
|
||||
ImplementerId = table.Column<int>(type: "int", nullable: false),
|
||||
Count = table.Column<int>(type: "int", nullable: false),
|
||||
Sum = table.Column<double>(type: "float", nullable: false),
|
||||
Status = table.Column<int>(type: "int", nullable: false),
|
||||
@ -77,6 +94,12 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
principalTable: "Clients",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Orders_Implementers_ImplementerId",
|
||||
column: x => x.ImplementerId,
|
||||
principalTable: "Implementers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Orders_Sushis_SushiId",
|
||||
column: x => x.SushiId,
|
||||
@ -117,6 +140,11 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
table: "Orders",
|
||||
column: "ClientId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Orders_ImplementerId",
|
||||
table: "Orders",
|
||||
column: "ImplementerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Orders_SushiId",
|
||||
table: "Orders",
|
||||
@ -145,6 +173,9 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "Clients");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Implementers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Components");
|
||||
|
@ -67,6 +67,33 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
b.ToTable("Components");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Implementer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ImplementerFIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Qualification")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkExperience")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Implementers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@ -87,6 +114,10 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
b.Property<DateTime?>("DateImplement")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("ImplementerId")
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
@ -100,6 +131,8 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("ImplementerId");
|
||||
|
||||
b.HasIndex("SushiId");
|
||||
|
||||
b.ToTable("Orders");
|
||||
@ -159,6 +192,12 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SushiBarDatabaseImplement.Models.Implementer", "Implementer")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("ImplementerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SushiBarDatabaseImplement.Models.Sushi", "Sushi")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("SushiId")
|
||||
@ -167,6 +206,8 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
|
||||
b.Navigation("Client");
|
||||
|
||||
b.Navigation("Implementer");
|
||||
|
||||
b.Navigation("Sushi");
|
||||
});
|
||||
|
||||
@ -199,6 +240,11 @@ namespace SushiBarDatabaseImplement.Migrations
|
||||
b.Navigation("SushiComponents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Implementer", b =>
|
||||
{
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SushiBarDatabaseImplement.Models.Sushi", b =>
|
||||
{
|
||||
b.Navigation("Components");
|
||||
|
@ -32,10 +32,10 @@ namespace SushiBarDatabaseImplement.Models
|
||||
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||
public DateTime? DateImplement { get; set; }
|
||||
|
||||
public virtual Client Client { get; set; }
|
||||
public virtual Client? Client { get; set; }
|
||||
public virtual Implementer? Implementer { get; set; }
|
||||
|
||||
public virtual Sushi Sushi { get; set; }
|
||||
public virtual Sushi? Sushi { get; set; }
|
||||
|
||||
public static Order? Create(OrderBindingModel? model)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user