diff --git a/AutomobilePlant/AutomobilePlant/FormMain.Designer.cs b/AutomobilePlant/AutomobilePlant/FormMain.Designer.cs
index 3ba79dc..a92a5c4 100644
--- a/AutomobilePlant/AutomobilePlant/FormMain.Designer.cs
+++ b/AutomobilePlant/AutomobilePlant/FormMain.Designer.cs
@@ -1,4 +1,6 @@
-namespace AutomobilePlant
+using System.Windows.Forms;
+
+namespace AutomobilePlant
{
partial class FormMain
{
@@ -28,399 +30,225 @@
///
private void InitializeComponent()
{
- this.menuStrip = new System.Windows.Forms.MenuStrip();
- this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.автомобилиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.клиентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.магазиныToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.списокАвтомобилейToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.компонентыПоАвтомобилямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.списокМагазиновToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.автомобилиВМагазинахToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.списокЗаказовПоДатеToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.buttonSupplyShop = new System.Windows.Forms.Button();
- this.dataGridView = new System.Windows.Forms.DataGridView();
- this.buttonCreateOrder = new System.Windows.Forms.Button();
- this.buttonSetToWork = new System.Windows.Forms.Button();
- this.buttonSetToDone = new System.Windows.Forms.Button();
- this.buttonSetToFinish = new System.Windows.Forms.Button();
- this.buttonUpdate = new System.Windows.Forms.Button();
- this.buttonSellCars = new System.Windows.Forms.Button();
- this.menuStrip.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
- this.SuspendLayout();
- //
- // menuStrip
- //
- this.menuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
- this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.menuStrip = new System.Windows.Forms.MenuStrip();
- this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.автомобилиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.клиентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.исполнителиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.списокАвтомобилейToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.компонентыПоАвтомобилямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.запускРаботToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.dataGridView = new System.Windows.Forms.DataGridView();
- this.buttonCreateOrder = new System.Windows.Forms.Button();
- this.buttonSetToFinish = new System.Windows.Forms.Button();
- this.buttonUpdate = new System.Windows.Forms.Button();
- this.menuStrip.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
- this.SuspendLayout();
+ menuStrip = new MenuStrip();
+ справочникиToolStripMenuItem = new ToolStripMenuItem();
+ компонентыToolStripMenuItem = new ToolStripMenuItem();
+ автомобилиToolStripMenuItem = new ToolStripMenuItem();
+ клиентыToolStripMenuItem = new ToolStripMenuItem();
+ магазиныToolStripMenuItem = new ToolStripMenuItem();
+ исполнителиToolStripMenuItem = new ToolStripMenuItem();
+ отчетыToolStripMenuItem = new ToolStripMenuItem();
+ списокАвтомобилейToolStripMenuItem = new ToolStripMenuItem();
+ компонентыПоАвтомобилямToolStripMenuItem = new ToolStripMenuItem();
+ списокЗаказовToolStripMenuItem = new ToolStripMenuItem();
+ списокМагазиновToolStripMenuItem = new ToolStripMenuItem();
+ автомобилиВМагазинахToolStripMenuItem = new ToolStripMenuItem();
+ списокЗаказовПоДатеToolStripMenuItem = new ToolStripMenuItem();
+ запускРаботToolStripMenuItem = new ToolStripMenuItem();
+ dataGridView = new DataGridView();
+ buttonCreateOrder = new Button();
+ buttonSetToFinish = new Button();
+ buttonUpdate = new Button();
+ buttonSupplyShop = new Button();
+ buttonSellCars = new Button();
+ menuStrip.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
+ SuspendLayout();
//
// menuStrip
//
- this.menuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
- this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.справочникиToolStripMenuItem,
- this.отчетыToolStripMenuItem,
- this.запускРаботToolStripMenuItem});
- this.menuStrip.Location = new System.Drawing.Point(0, 0);
- this.menuStrip.Name = "menuStrip";
- this.menuStrip.Size = new System.Drawing.Size(1436, 28);
- this.menuStrip.TabIndex = 0;
- this.menuStrip.Text = "Справочники";
+ menuStrip.ImageScalingSize = new Size(20, 20);
+ menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, отчетыToolStripMenuItem, запускРаботToolStripMenuItem });
+ menuStrip.Location = new Point(0, 0);
+ menuStrip.Name = "menuStrip";
+ menuStrip.Size = new Size(1139, 28);
+ menuStrip.TabIndex = 0;
+ menuStrip.Text = "Справочники";
//
// справочникиToolStripMenuItem
//
- this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.компонентыToolStripMenuItem,
- this.автомобилиToolStripMenuItem,
- this.клиентыToolStripMenuItem,
- this.магазиныToolStripMenuItem});
- this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
- this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(117, 24);
- this.справочникиToolStripMenuItem.Text = "Справочники";
- //
- // компонентыToolStripMenuItem
- //
- this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
- this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
- this.компонентыToolStripMenuItem.Text = "Компоненты";
- this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click);
- //
- // автомобилиToolStripMenuItem
- //
- this.автомобилиToolStripMenuItem.Name = "автомобилиToolStripMenuItem";
- this.автомобилиToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
- this.автомобилиToolStripMenuItem.Text = "Автомобили";
- this.автомобилиToolStripMenuItem.Click += new System.EventHandler(this.автомобилиToolStripMenuItem_Click);
- //
- // клиентыToolStripMenuItem
- //
- this.клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem";
- this.клиентыToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
- this.клиентыToolStripMenuItem.Text = "Клиенты";
- this.клиентыToolStripMenuItem.Click += new System.EventHandler(this.клиентыToolStripMenuItem_Click);
- //
- // магазиныToolStripMenuItem
- //
- this.магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
- this.магазиныToolStripMenuItem.Size = new System.Drawing.Size(182, 26);
- this.магазиныToolStripMenuItem.Text = "Магазины";
- this.магазиныToolStripMenuItem.Click += new System.EventHandler(this.магазиныToolStripMenuItem_Click);
- //
- // отчетыToolStripMenuItem
- //
- this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.клиентыToolStripMenuItem,
- this.исполнителиToolStripMenuItem});
- this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
- this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(117, 24);
- this.справочникиToolStripMenuItem.Text = "Справочники";
+ справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem, автомобилиToolStripMenuItem, клиентыToolStripMenuItem, магазиныToolStripMenuItem, исполнителиToolStripMenuItem });
+ справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
+ справочникиToolStripMenuItem.Size = new Size(117, 24);
+ справочникиToolStripMenuItem.Text = "Справочники";
//
// компонентыToolStripMenuItem
//
- this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
- this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
- this.компонентыToolStripMenuItem.Text = "Компоненты";
- this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click);
+ компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
+ компонентыToolStripMenuItem.Size = new Size(224, 26);
+ компонентыToolStripMenuItem.Text = "Компоненты";
+ компонентыToolStripMenuItem.Click += компонентыToolStripMenuItem_Click;
//
// автомобилиToolStripMenuItem
//
- this.автомобилиToolStripMenuItem.Name = "автомобилиToolStripMenuItem";
- this.автомобилиToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
- this.автомобилиToolStripMenuItem.Text = "Автомобили";
- this.автомобилиToolStripMenuItem.Click += new System.EventHandler(this.автомобилиToolStripMenuItem_Click);
+ автомобилиToolStripMenuItem.Name = "автомобилиToolStripMenuItem";
+ автомобилиToolStripMenuItem.Size = new Size(224, 26);
+ автомобилиToolStripMenuItem.Text = "Автомобили";
+ автомобилиToolStripMenuItem.Click += автомобилиToolStripMenuItem_Click;
//
// клиентыToolStripMenuItem
//
- this.клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem";
- this.клиентыToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
- this.клиентыToolStripMenuItem.Text = "Клиенты";
- this.клиентыToolStripMenuItem.Click += new System.EventHandler(this.клиентыToolStripMenuItem_Click);
+ клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem";
+ клиентыToolStripMenuItem.Size = new Size(224, 26);
+ клиентыToolStripMenuItem.Text = "Клиенты";
+ клиентыToolStripMenuItem.Click += клиентыToolStripMenuItem_Click;
+ //
+ // магазиныToolStripMenuItem
+ //
+ магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
+ магазиныToolStripMenuItem.Size = new Size(224, 26);
+ магазиныToolStripMenuItem.Text = "Магазины";
+ магазиныToolStripMenuItem.Click += магазиныToolStripMenuItem_Click;
//
// исполнителиToolStripMenuItem
//
- this.исполнителиToolStripMenuItem.Name = "исполнителиToolStripMenuItem";
- this.исполнителиToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
- this.исполнителиToolStripMenuItem.Text = "Исполнители";
- this.исполнителиToolStripMenuItem.Click += new System.EventHandler(this.исполнителиToolStripMenuItem_Click);
+ исполнителиToolStripMenuItem.Name = "исполнителиToolStripMenuItem";
+ исполнителиToolStripMenuItem.Size = new Size(224, 26);
+ исполнителиToolStripMenuItem.Text = "Исполнители";
+ исполнителиToolStripMenuItem.Click += исполнителиToolStripMenuItem_Click;
//
// отчетыToolStripMenuItem
//
- this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.списокАвтомобилейToolStripMenuItem,
- this.компонентыПоАвтомобилямToolStripMenuItem,
- this.списокЗаказовToolStripMenuItem,
- this.списокМагазиновToolStripMenuItem,
- this.автомобилиВМагазинахToolStripMenuItem,
- this.списокЗаказовПоДатеToolStripMenuItem});
- this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
- this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
- this.отчетыToolStripMenuItem.Text = "Отчеты";
- //
- // списокАвтомобилейToolStripMenuItem
- //
- this.списокАвтомобилейToolStripMenuItem.Name = "списокАвтомобилейToolStripMenuItem";
- this.списокАвтомобилейToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.списокАвтомобилейToolStripMenuItem.Text = "Список автомобилей";
- this.списокАвтомобилейToolStripMenuItem.Click += new System.EventHandler(this.списокАвтомобилейToolStripMenuItem_Click);
- //
- // компонентыПоАвтомобилямToolStripMenuItem
- //
- this.компонентыПоАвтомобилямToolStripMenuItem.Name = "компонентыПоАвтомобилямToolStripMenuItem";
- this.компонентыПоАвтомобилямToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.компонентыПоАвтомобилямToolStripMenuItem.Text = "Компоненты по автомобилям";
- this.компонентыПоАвтомобилямToolStripMenuItem.Click += new System.EventHandler(this.компонентыПоАвтомобилямToolStripMenuItem_Click);
- //
- // списокЗаказовToolStripMenuItem
- //
- this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
- this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.списокЗаказовToolStripMenuItem.Text = "Список заказов";
- this.списокЗаказовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказовToolStripMenuItem_Click);
- //
- // списокМагазиновToolStripMenuItem
- //
- this.списокМагазиновToolStripMenuItem.Name = "списокМагазиновToolStripMenuItem";
- this.списокМагазиновToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.списокМагазиновToolStripMenuItem.Text = "Список магазинов";
- this.списокМагазиновToolStripMenuItem.Click += new System.EventHandler(this.списокМагазиновToolStripMenuItem_Click);
- //
- // автомобилиВМагазинахToolStripMenuItem
- //
- this.автомобилиВМагазинахToolStripMenuItem.Name = "автомобилиВМагазинахToolStripMenuItem";
- this.автомобилиВМагазинахToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.автомобилиВМагазинахToolStripMenuItem.Text = "Автомобили в магазинах";
- this.автомобилиВМагазинахToolStripMenuItem.Click += new System.EventHandler(this.автомобилиВМагазинахToolStripMenuItem_Click);
- //
- // списокЗаказовПоДатеToolStripMenuItem
- //
- this.списокЗаказовПоДатеToolStripMenuItem.Name = "списокЗаказовПоДатеToolStripMenuItem";
- this.списокЗаказовПоДатеToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.списокЗаказовПоДатеToolStripMenuItem.Text = "Список заказов по дате";
- this.списокЗаказовПоДатеToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказовПоДатеToolStripMenuItem_Click);
- //
- // buttonSupplyShop
- //
- this.buttonSupplyShop.Location = new System.Drawing.Point(1220, 182);
- this.buttonSupplyShop.Name = "buttonSupplyShop";
- this.buttonSupplyShop.Size = new System.Drawing.Size(194, 30);
- this.buttonSupplyShop.TabIndex = 7;
- this.buttonSupplyShop.Text = "Пополнение магазина";
- this.buttonSupplyShop.UseVisualStyleBackColor = true;
- this.buttonSupplyShop.Click += new System.EventHandler(this.buttonSupplyShop_Click);
- //
- // dataGridView
- //
- this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.dataGridView.Location = new System.Drawing.Point(12, 31);
- this.dataGridView.Name = "dataGridView";
- this.dataGridView.RowHeadersWidth = 51;
- this.dataGridView.RowTemplate.Height = 29;
- this.dataGridView.Size = new System.Drawing.Size(1188, 407);
- this.dataGridView.TabIndex = 1;
- //
- // buttonCreateOrder
- //
- this.buttonCreateOrder.Location = new System.Drawing.Point(1220, 42);
- this.buttonCreateOrder.Name = "buttonCreateOrder";
- this.buttonCreateOrder.Size = new System.Drawing.Size(194, 29);
- this.buttonCreateOrder.TabIndex = 2;
- this.buttonCreateOrder.Text = "Создать заказ";
- this.buttonCreateOrder.UseVisualStyleBackColor = true;
- this.buttonCreateOrder.Click += new System.EventHandler(this.ButtonCreateOrder_Click);
- //
- // buttonSetToWork
- //
- this.buttonSetToWork.Location = new System.Drawing.Point(1220, 77);
- this.buttonSetToWork.Name = "buttonSetToWork";
- this.buttonSetToWork.Size = new System.Drawing.Size(194, 29);
- this.buttonSetToWork.TabIndex = 3;
- this.buttonSetToWork.Text = "Отдать на выполнение";
- this.buttonSetToWork.UseVisualStyleBackColor = true;
- this.buttonSetToWork.Click += new System.EventHandler(this.ButtonSetToWork_Click);
- //
- // buttonSetToDone
- //
- this.buttonSetToDone.Location = new System.Drawing.Point(1220, 112);
- this.buttonSetToDone.Name = "buttonSetToDone";
- this.buttonSetToDone.Size = new System.Drawing.Size(194, 29);
- this.buttonSetToDone.TabIndex = 4;
- this.buttonSetToDone.Text = "Заказ готов";
- this.buttonSetToDone.UseVisualStyleBackColor = true;
- this.buttonSetToDone.Click += new System.EventHandler(this.ButtonSetToDone_Click);
- //
- // buttonSetToFinish
- //
- this.buttonSetToFinish.Location = new System.Drawing.Point(1220, 147);
- this.buttonSetToFinish.Name = "buttonSetToFinish";
- this.buttonSetToFinish.Size = new System.Drawing.Size(194, 29);
- this.buttonSetToFinish.TabIndex = 5;
- this.buttonSetToFinish.Text = "Заказ выдан";
- this.buttonSetToFinish.UseVisualStyleBackColor = true;
- this.buttonSetToFinish.Click += new System.EventHandler(this.ButtonSetToFinish_Click);
- //
- // buttonUpdate
- //
- this.buttonUpdate.Location = new System.Drawing.Point(1220, 409);
- this.buttonUpdate.Name = "buttonUpdate";
- this.buttonUpdate.Size = new System.Drawing.Size(194, 29);
- this.buttonUpdate.TabIndex = 6;
- this.buttonUpdate.Text = "Обновить";
- this.buttonUpdate.UseVisualStyleBackColor = true;
- this.buttonUpdate.Click += new System.EventHandler(this.ButtonUpdate_Click);
- //
- // buttonSellCars
- //
- this.buttonSellCars.Location = new System.Drawing.Point(1220, 218);
- this.buttonSellCars.Name = "buttonSellCars";
- this.buttonSellCars.Size = new System.Drawing.Size(194, 29);
- this.buttonSellCars.TabIndex = 7;
- this.buttonSellCars.Text = "Продажа автомобилей";
- this.buttonSellCars.UseVisualStyleBackColor = true;
- this.buttonSellCars.Click += new System.EventHandler(this.buttonSellCars_Click);
- //
- // FormMain
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1436, 450);
- this.Controls.Add(this.buttonSellCars);
- this.Controls.Add(this.buttonSupplyShop);
- this.Controls.Add(this.buttonUpdate);
- this.Controls.Add(this.buttonSetToFinish);
- this.Controls.Add(this.buttonSetToDone);
- this.Controls.Add(this.buttonSetToWork);
- this.Controls.Add(this.buttonCreateOrder);
- this.Controls.Add(this.dataGridView);
- this.Controls.Add(this.menuStrip);
- this.MainMenuStrip = this.menuStrip;
- this.Name = "FormMain";
- this.Text = "Автомобильный завод";
- this.Load += new System.EventHandler(this.FormMain_Load);
- this.menuStrip.ResumeLayout(false);
- this.menuStrip.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
- this.списокЗаказовToolStripMenuItem});
- this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
- this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(73, 24);
- this.отчетыToolStripMenuItem.Text = "Отчеты";
+ отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { списокАвтомобилейToolStripMenuItem, компонентыПоАвтомобилямToolStripMenuItem, списокЗаказовToolStripMenuItem, списокМагазиновToolStripMenuItem, автомобилиВМагазинахToolStripMenuItem, списокЗаказовПоДатеToolStripMenuItem });
+ отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
+ отчетыToolStripMenuItem.Size = new Size(73, 24);
+ отчетыToolStripMenuItem.Text = "Отчеты";
//
// списокАвтомобилейToolStripMenuItem
//
- this.списокАвтомобилейToolStripMenuItem.Name = "списокАвтомобилейToolStripMenuItem";
- this.списокАвтомобилейToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.списокАвтомобилейToolStripMenuItem.Text = "Список автомобилей";
- this.списокАвтомобилейToolStripMenuItem.Click += new System.EventHandler(this.списокАвтомобилейToolStripMenuItem_Click);
+ списокАвтомобилейToolStripMenuItem.Name = "списокАвтомобилейToolStripMenuItem";
+ списокАвтомобилейToolStripMenuItem.Size = new Size(259, 26);
+ списокАвтомобилейToolStripMenuItem.Text = "Список автомобилей";
+ списокАвтомобилейToolStripMenuItem.Click += списокАвтомобилейToolStripMenuItem_Click;
//
// компонентыПоАвтомобилямToolStripMenuItem
//
- this.компонентыПоАвтомобилямToolStripMenuItem.Name = "компонентыПоАвтомобилямToolStripMenuItem";
- this.компонентыПоАвтомобилямToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.компонентыПоАвтомобилямToolStripMenuItem.Text = "Компоненты по автомобилям";
- this.компонентыПоАвтомобилямToolStripMenuItem.Click += new System.EventHandler(this.компонентыПоАвтомобилямToolStripMenuItem_Click);
+ компонентыПоАвтомобилямToolStripMenuItem.Name = "компонентыПоАвтомобилямToolStripMenuItem";
+ компонентыПоАвтомобилямToolStripMenuItem.Size = new Size(259, 26);
+ компонентыПоАвтомобилямToolStripMenuItem.Text = "Бланки по документам";
+ компонентыПоАвтомобилямToolStripMenuItem.Click += компонентыПоАвтомобилямToolStripMenuItem_Click;
//
// списокЗаказовToolStripMenuItem
//
- this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
- this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
- this.списокЗаказовToolStripMenuItem.Text = "Список заказов";
- this.списокЗаказовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказовToolStripMenuItem_Click);
+ списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
+ списокЗаказовToolStripMenuItem.Size = new Size(259, 26);
+ списокЗаказовToolStripMenuItem.Text = "Список заказов";
+ списокЗаказовToolStripMenuItem.Click += списокЗаказовToolStripMenuItem_Click;
+ //
+ // списокМагазиновToolStripMenuItem
+ //
+ списокМагазиновToolStripMenuItem.Name = "списокМагазиновToolStripMenuItem";
+ списокМагазиновToolStripMenuItem.Size = new Size(259, 26);
+ списокМагазиновToolStripMenuItem.Text = "Список магазинов";
+ списокМагазиновToolStripMenuItem.Click += списокМагазиновToolStripMenuItem_Click;
+ //
+ // автомобилиВМагазинахToolStripMenuItem
+ //
+ автомобилиВМагазинахToolStripMenuItem.Name = "автомобилиВМагазинахToolStripMenuItem";
+ автомобилиВМагазинахToolStripMenuItem.Size = new Size(259, 26);
+ автомобилиВМагазинахToolStripMenuItem.Text = "Автомобили в магазинах";
+ автомобилиВМагазинахToolStripMenuItem.Click += автомобилиВМагазинахToolStripMenuItem_Click;
+ //
+ // списокЗаказовПоДатеToolStripMenuItem
+ //
+ списокЗаказовПоДатеToolStripMenuItem.Name = "списокЗаказовПоДатеToolStripMenuItem";
+ списокЗаказовПоДатеToolStripMenuItem.Size = new Size(259, 26);
+ списокЗаказовПоДатеToolStripMenuItem.Text = "Список заказов по дате";
+ списокЗаказовПоДатеToolStripMenuItem.Click += списокЗаказовПоДатеToolStripMenuItem_Click;
//
// запускРаботToolStripMenuItem
//
- this.запускРаботToolStripMenuItem.Name = "запускРаботToolStripMenuItem";
- this.запускРаботToolStripMenuItem.Size = new System.Drawing.Size(114, 24);
- this.запускРаботToolStripMenuItem.Text = "Запуск работ";
- this.запускРаботToolStripMenuItem.Click += new System.EventHandler(this.запускРаботToolStripMenuItem_Click);
+ запускРаботToolStripMenuItem.Name = "запускРаботToolStripMenuItem";
+ запускРаботToolStripMenuItem.Size = new Size(125, 24);
+ запускРаботToolStripMenuItem.Text = "Запуск работы";
+ запускРаботToolStripMenuItem.Click += запускРаботToolStripMenuItem_Click;
//
// dataGridView
//
- this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.dataGridView.Location = new System.Drawing.Point(12, 31);
- this.dataGridView.Name = "dataGridView";
- this.dataGridView.RowHeadersWidth = 51;
- this.dataGridView.RowTemplate.Height = 29;
- this.dataGridView.Size = new System.Drawing.Size(1188, 407);
- this.dataGridView.TabIndex = 1;
+ dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ dataGridView.Location = new Point(12, 31);
+ dataGridView.Name = "dataGridView";
+ dataGridView.RowHeadersWidth = 51;
+ dataGridView.RowTemplate.Height = 29;
+ dataGridView.Size = new Size(915, 407);
+ dataGridView.TabIndex = 1;
//
// buttonCreateOrder
//
- this.buttonCreateOrder.Location = new System.Drawing.Point(1220, 42);
- this.buttonCreateOrder.Name = "buttonCreateOrder";
- this.buttonCreateOrder.Size = new System.Drawing.Size(194, 29);
- this.buttonCreateOrder.TabIndex = 2;
- this.buttonCreateOrder.Text = "Создать заказ";
- this.buttonCreateOrder.UseVisualStyleBackColor = true;
- this.buttonCreateOrder.Click += new System.EventHandler(this.ButtonCreateOrder_Click);
+ buttonCreateOrder.Location = new Point(933, 45);
+ buttonCreateOrder.Name = "buttonCreateOrder";
+ buttonCreateOrder.Size = new Size(194, 29);
+ buttonCreateOrder.TabIndex = 2;
+ buttonCreateOrder.Text = "Создать заказ";
+ buttonCreateOrder.UseVisualStyleBackColor = true;
+ buttonCreateOrder.Click += ButtonCreateOrder_Click;
//
// buttonSetToFinish
//
- this.buttonSetToFinish.Location = new System.Drawing.Point(1220, 147);
- this.buttonSetToFinish.Name = "buttonSetToFinish";
- this.buttonSetToFinish.Size = new System.Drawing.Size(194, 29);
- this.buttonSetToFinish.TabIndex = 5;
- this.buttonSetToFinish.Text = "Заказ выдан";
- this.buttonSetToFinish.UseVisualStyleBackColor = true;
- this.buttonSetToFinish.Click += new System.EventHandler(this.ButtonSetToFinish_Click);
+ buttonSetToFinish.Location = new Point(933, 80);
+ buttonSetToFinish.Name = "buttonSetToFinish";
+ buttonSetToFinish.Size = new Size(194, 29);
+ buttonSetToFinish.TabIndex = 5;
+ buttonSetToFinish.Text = "Заказ выдан";
+ buttonSetToFinish.UseVisualStyleBackColor = true;
+ buttonSetToFinish.Click += ButtonSetToFinish_Click;
//
// buttonUpdate
//
- this.buttonUpdate.Location = new System.Drawing.Point(1220, 409);
- this.buttonUpdate.Name = "buttonUpdate";
- this.buttonUpdate.Size = new System.Drawing.Size(194, 29);
- this.buttonUpdate.TabIndex = 6;
- this.buttonUpdate.Text = "Обновить";
- this.buttonUpdate.UseVisualStyleBackColor = true;
- this.buttonUpdate.Click += new System.EventHandler(this.ButtonUpdate_Click);
+ buttonUpdate.Location = new Point(933, 410);
+ buttonUpdate.Name = "buttonUpdate";
+ buttonUpdate.Size = new Size(194, 29);
+ buttonUpdate.TabIndex = 6;
+ buttonUpdate.Text = "Обновить";
+ buttonUpdate.UseVisualStyleBackColor = true;
+ buttonUpdate.Click += ButtonUpdate_Click;
+ //
+ // buttonSupplyShop
+ //
+ buttonSupplyShop.Location = new Point(933, 115);
+ buttonSupplyShop.Name = "buttonSupplyShop";
+ buttonSupplyShop.Size = new Size(194, 29);
+ buttonSupplyShop.TabIndex = 7;
+ buttonSupplyShop.Text = "Пополнение магазина";
+ buttonSupplyShop.UseVisualStyleBackColor = true;
+ buttonSupplyShop.Click += buttonSupplyShop_Click;
+ //
+ // buttonSellCars
+ //
+ buttonSellCars.Location = new Point(933, 150);
+ buttonSellCars.Name = "buttonSellCars";
+ buttonSellCars.Size = new Size(194, 29);
+ buttonSellCars.TabIndex = 8;
+ buttonSellCars.Text = "Продажа авто";
+ buttonSellCars.UseVisualStyleBackColor = true;
+ buttonSellCars.Click += buttonSellCars_Click;
//
// FormMain
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1436, 450);
- this.Controls.Add(this.buttonUpdate);
- this.Controls.Add(this.buttonSetToFinish);
- this.Controls.Add(this.buttonCreateOrder);
- this.Controls.Add(this.dataGridView);
- this.Controls.Add(this.menuStrip);
- this.MainMenuStrip = this.menuStrip;
- this.Name = "FormMain";
- this.Text = "Автомобильный завод";
- this.Load += new System.EventHandler(this.FormMain_Load);
- this.menuStrip.ResumeLayout(false);
- this.menuStrip.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
+ AutoScaleDimensions = new SizeF(8F, 20F);
+ AutoScaleMode = AutoScaleMode.Font;
+ ClientSize = new Size(1139, 450);
+ Controls.Add(buttonSellCars);
+ Controls.Add(buttonSupplyShop);
+ Controls.Add(buttonUpdate);
+ Controls.Add(buttonSetToFinish);
+ Controls.Add(buttonCreateOrder);
+ Controls.Add(dataGridView);
+ Controls.Add(menuStrip);
+ MainMenuStrip = menuStrip;
+ Name = "FormMain";
+ Text = "Автомобильный завод";
+ Load += FormMain_Load;
+ menuStrip.ResumeLayout(false);
+ menuStrip.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
+ ResumeLayout(false);
+ PerformLayout();
+ }
- }
+ #endregion
- #endregion
-
- private MenuStrip menuStrip;
+ private MenuStrip menuStrip;
private ToolStripMenuItem справочникиToolStripMenuItem;
private ToolStripMenuItem компонентыToolStripMenuItem;
private ToolStripMenuItem автомобилиToolStripMenuItem;
diff --git a/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/OrderLogic.cs b/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/OrderLogic.cs
index afc1094..27ae769 100644
--- a/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/OrderLogic.cs
+++ b/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/OrderLogic.cs
@@ -80,7 +80,7 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
}
CheckModel(model, false);
- if (model.Status + 1 != newStatus)
+ if (model.Status + 1 != newStatus && model.Status != OrderStatus.Ожидание)
{
_logger.LogWarning("Status update to " + newStatus.ToString() + " operation failed. Order status incorrect.");
return false;
@@ -96,8 +96,10 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
if (CheckThenSupplyMany(car, model.Count) == false)
{
_logger.LogWarning("Status update to " + newStatus.ToString() + " operation failed. Shop supply error.");
- return false;
- }
+ model.Status = OrderStatus.Ожидание;
+ _orderStorage.Update(model);
+ return false;
+ }
}
model.Status = newStatus;
if (model.Status == OrderStatus.Выдан) model.DateImplement = DateTime.Now;
diff --git a/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/WorkModeling.cs b/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/WorkModeling.cs
index 417b9e9..2d6d5c6 100644
--- a/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/WorkModeling.cs
+++ b/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/WorkModeling.cs
@@ -36,6 +36,11 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
return;
}
var orders = _orderLogic.ReadList(new OrderSearchModel { Status = OrderStatus.Принят });
+ if (orders != null)
+ {
+ orders.AddRange(_orderLogic.ReadList(new OrderSearchModel { Status = OrderStatus.Выполняется }) ?? new());
+ orders.AddRange(_orderLogic.ReadList(new OrderSearchModel { Status = OrderStatus.Ожидание }) ?? new());
+ }
if (orders == null || orders.Count == 0)
{
_logger.LogWarning("DoWork. Orders is null or empty");
@@ -54,7 +59,9 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
{
return;
}
- await RunOrderInWork(implementer);
+ await RunWaitingOrder(implementer);
+
+ await RunOrderInWork(implementer);
await Task.Run(() =>
{
@@ -106,6 +113,7 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
}
try
{
+ // Выбираем из всех заказов тот, который выполняется данным исполнителем
var runOrder = await Task.Run(() => _orderLogic.ReadElement(new OrderSearchModel
{
ImplementerId = implementer.Id,
@@ -121,7 +129,8 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
_logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, runOrder.Id);
_orderLogic.DeliveryOrder(new OrderBindingModel
{
- Id = runOrder.Id
+ Id = runOrder.Id,
+ ImplementerId = implementer.Id
});
// отдыхаем
Thread.Sleep(implementer.Qualification * _rnd.Next(10, 100));
@@ -138,5 +147,41 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
throw;
}
}
- }
+
+ private async Task RunWaitingOrder(ImplementerViewModel implementer)
+ {
+ if (_orderLogic == null || implementer == null)
+ {
+ return;
+ }
+ try
+ {
+ var order = await Task.Run(() => _orderLogic.ReadElement(new OrderSearchModel
+ {
+ ImplementerId = implementer.Id,
+ Status = OrderStatus.Ожидание
+ }));
+ if (order == null)
+ {
+ return;
+ }
+ _logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, order.Id);
+ _orderLogic.DeliveryOrder(new OrderBindingModel
+ {
+ Id = order.Id,
+ ImplementerId = implementer.Id
+ });
+ Thread.Sleep(implementer.Qualification * _rnd.Next(10, 100));
+ }
+ catch (InvalidOperationException ex)
+ {
+ _logger.LogWarning(ex, "Error try get work");
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "Error while do work");
+ throw;
+ }
+ }
+ }
}
diff --git a/AutomobilePlant/AutomobilePlantDataModels/Enums/OrderStatus.cs b/AutomobilePlant/AutomobilePlantDataModels/Enums/OrderStatus.cs
index 9f6907e..704986a 100644
--- a/AutomobilePlant/AutomobilePlantDataModels/Enums/OrderStatus.cs
+++ b/AutomobilePlant/AutomobilePlantDataModels/Enums/OrderStatus.cs
@@ -13,5 +13,6 @@ namespace AutomobilePlantDataModels.Enums
Выполняется = 1,
Готов = 2,
Выдан = 3,
- }
+ Ожидание = 4
+ }
}
diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230409195631_implementor.Designer.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230409195631_implementor.Designer.cs
deleted file mode 100644
index bace623..0000000
--- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230409195631_implementor.Designer.cs
+++ /dev/null
@@ -1,257 +0,0 @@
-//
-using System;
-using AutomobilePlantDatabaseImplement;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace AutomobilePlantDatabaseImplement.Migrations
-{
- [DbContext(typeof(AutomobilePlantDatabase))]
- [Migration("20230409195631_implementor")]
- partial class implementor
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.3")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Car", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Price")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.ToTable("Cars");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarId")
- .HasColumnType("int");
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("CarId");
-
- b.HasIndex("ComponentId");
-
- b.ToTable("CarComponents");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ClientFIO")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Clients");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cost")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.ToTable("Components");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Implementer", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ImplementerFIO")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Qualification")
- .HasColumnType("int");
-
- b.Property("WorkExperience")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("Implementers");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Order", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarId")
- .HasColumnType("int");
-
- b.Property("ClientId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("DateCreate")
- .HasColumnType("datetime2");
-
- b.Property("DateImplement")
- .HasColumnType("datetime2");
-
- b.Property("ImplementerId")
- .HasColumnType("int");
-
- b.Property("Status")
- .HasColumnType("int");
-
- b.Property("Sum")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.HasIndex("CarId");
-
- b.HasIndex("ClientId");
-
- b.HasIndex("ImplementerId");
-
- b.ToTable("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
- {
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Car", "Car")
- .WithMany("Components")
- .HasForeignKey("CarId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Component", "Component")
- .WithMany("CarComponents")
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Car");
-
- b.Navigation("Component");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Order", b =>
- {
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Car", "Car")
- .WithMany("Orders")
- .HasForeignKey("CarId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Client", "Client")
- .WithMany("Orders")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Implementer", "Implementer")
- .WithMany("Orders")
- .HasForeignKey("ImplementerId");
-
- b.Navigation("Car");
-
- b.Navigation("Client");
-
- b.Navigation("Implementer");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Car", b =>
- {
- b.Navigation("Components");
-
- b.Navigation("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
- {
- b.Navigation("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
- {
- b.Navigation("CarComponents");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Implementer", b =>
- {
- b.Navigation("Orders");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230409195631_implementor.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230409195631_implementor.cs
deleted file mode 100644
index 72c55b6..0000000
--- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230409195631_implementor.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace AutomobilePlantDatabaseImplement.Migrations
-{
- ///
- public partial class implementor : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn(
- name: "ImplementerId",
- table: "Orders",
- type: "int",
- nullable: true);
-
- migrationBuilder.CreateTable(
- name: "Implementers",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ImplementerFIO = table.Column(type: "nvarchar(max)", nullable: false),
- Password = table.Column(type: "nvarchar(max)", nullable: false),
- WorkExperience = table.Column(type: "int", nullable: false),
- Qualification = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Implementers", x => x.Id);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_Orders_ImplementerId",
- table: "Orders",
- column: "ImplementerId");
-
- migrationBuilder.AddForeignKey(
- name: "FK_Orders_Implementers_ImplementerId",
- table: "Orders",
- column: "ImplementerId",
- principalTable: "Implementers",
- principalColumn: "Id");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_Orders_Implementers_ImplementerId",
- table: "Orders");
-
- migrationBuilder.DropTable(
- name: "Implementers");
-
- migrationBuilder.DropIndex(
- name: "IX_Orders_ImplementerId",
- table: "Orders");
-
- migrationBuilder.DropColumn(
- name: "ImplementerId",
- table: "Orders");
- }
- }
-}
diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230410011115_labfivehard.Designer.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230410011115_labfivehard.Designer.cs
deleted file mode 100644
index 57bf5f7..0000000
--- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230410011115_labfivehard.Designer.cs
+++ /dev/null
@@ -1,291 +0,0 @@
-//
-using System;
-using AutomobilePlantDatabaseImplement;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace AutomobilePlantDatabaseImplement.Migrations
-{
- [DbContext(typeof(AutomobilePlantDatabase))]
- [Migration("20230410011115_labfivehard")]
- partial class labfivehard
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.3")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Car", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Price")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.ToTable("Cars");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarId")
- .HasColumnType("int");
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("CarId");
-
- b.HasIndex("ComponentId");
-
- b.ToTable("CarComponents");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ClientFIO")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Clients");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cost")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.ToTable("Components");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Order", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarId")
- .HasColumnType("int");
-
- b.Property("ClientId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("DateCreate")
- .HasColumnType("datetime2");
-
- b.Property("DateImplement")
- .HasColumnType("datetime2");
-
- b.Property("Status")
- .HasColumnType("int");
-
- b.Property("Sum")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.HasIndex("CarId");
-
- b.HasIndex("ClientId");
-
- b.ToTable("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Shop", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Address")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("MaxCountCars")
- .HasColumnType("int");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("OpeningDate")
- .HasColumnType("datetime2");
-
- b.HasKey("Id");
-
- b.ToTable("Shops");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.ShopCar", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("ShopId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("CarId");
-
- b.HasIndex("ShopId");
-
- b.ToTable("ShopCars");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
- {
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Car", "Car")
- .WithMany("Components")
- .HasForeignKey("CarId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Component", "Component")
- .WithMany("CarComponents")
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Car");
-
- b.Navigation("Component");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Order", b =>
- {
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Car", "Car")
- .WithMany("Orders")
- .HasForeignKey("CarId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Client", "Client")
- .WithMany("Orders")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Car");
-
- b.Navigation("Client");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.ShopCar", b =>
- {
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Car", "Car")
- .WithMany()
- .HasForeignKey("CarId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Shop", "Shop")
- .WithMany("Cars")
- .HasForeignKey("ShopId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Car");
-
- b.Navigation("Shop");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Car", b =>
- {
- b.Navigation("Components");
-
- b.Navigation("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
- {
- b.Navigation("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
- {
- b.Navigation("CarComponents");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Shop", b =>
- {
- b.Navigation("Cars");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230410011115_labfivehard.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230410011115_labfivehard.cs
deleted file mode 100644
index c4fecdf..0000000
--- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/20230410011115_labfivehard.cs
+++ /dev/null
@@ -1,214 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace AutomobilePlantDatabaseImplement.Migrations
-{
- ///
- public partial class labfivehard : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "Cars",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CarName = table.Column(type: "nvarchar(max)", nullable: false),
- Price = table.Column(type: "float", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Cars", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Clients",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ClientFIO = table.Column(type: "nvarchar(max)", nullable: false),
- Email = table.Column(type: "nvarchar(max)", nullable: false),
- Password = table.Column(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Clients", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Components",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ComponentName = table.Column(type: "nvarchar(max)", nullable: false),
- Cost = table.Column(type: "float", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Components", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Shops",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Name = table.Column(type: "nvarchar(max)", nullable: false),
- Address = table.Column(type: "nvarchar(max)", nullable: false),
- OpeningDate = table.Column(type: "datetime2", nullable: false),
- MaxCountCars = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Shops", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Orders",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CarId = table.Column(type: "int", nullable: false),
- ClientId = table.Column(type: "int", nullable: false),
- Count = table.Column(type: "int", nullable: false),
- Sum = table.Column(type: "float", nullable: false),
- Status = table.Column(type: "int", nullable: false),
- DateCreate = table.Column(type: "datetime2", nullable: false),
- DateImplement = table.Column(type: "datetime2", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Orders", x => x.Id);
- table.ForeignKey(
- name: "FK_Orders_Cars_CarId",
- column: x => x.CarId,
- principalTable: "Cars",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_Orders_Clients_ClientId",
- column: x => x.ClientId,
- principalTable: "Clients",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "CarComponents",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CarId = table.Column(type: "int", nullable: false),
- ComponentId = table.Column(type: "int", nullable: false),
- Count = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_CarComponents", x => x.Id);
- table.ForeignKey(
- name: "FK_CarComponents_Cars_CarId",
- column: x => x.CarId,
- principalTable: "Cars",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_CarComponents_Components_ComponentId",
- column: x => x.ComponentId,
- principalTable: "Components",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "ShopCars",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CarId = table.Column(type: "int", nullable: false),
- ShopId = table.Column(type: "int", nullable: false),
- Count = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ShopCars", x => x.Id);
- table.ForeignKey(
- name: "FK_ShopCars_Cars_CarId",
- column: x => x.CarId,
- principalTable: "Cars",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_ShopCars_Shops_ShopId",
- column: x => x.ShopId,
- principalTable: "Shops",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_CarComponents_CarId",
- table: "CarComponents",
- column: "CarId");
-
- migrationBuilder.CreateIndex(
- name: "IX_CarComponents_ComponentId",
- table: "CarComponents",
- column: "ComponentId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Orders_CarId",
- table: "Orders",
- column: "CarId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Orders_ClientId",
- table: "Orders",
- column: "ClientId");
-
- migrationBuilder.CreateIndex(
- name: "IX_ShopCars_CarId",
- table: "ShopCars",
- column: "CarId");
-
- migrationBuilder.CreateIndex(
- name: "IX_ShopCars_ShopId",
- table: "ShopCars",
- column: "ShopId");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "CarComponents");
-
- migrationBuilder.DropTable(
- name: "Orders");
-
- migrationBuilder.DropTable(
- name: "ShopCars");
-
- migrationBuilder.DropTable(
- name: "Components");
-
- migrationBuilder.DropTable(
- name: "Clients");
-
- migrationBuilder.DropTable(
- name: "Cars");
-
- migrationBuilder.DropTable(
- name: "Shops");
- }
- }
-}
diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/AutomobilePlantDatabaseModelSnapshot.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/AutomobilePlantDatabaseModelSnapshot.cs
deleted file mode 100644
index 3f78d90..0000000
--- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Migrations/AutomobilePlantDatabaseModelSnapshot.cs
+++ /dev/null
@@ -1,331 +0,0 @@
-//
-using System;
-using AutomobilePlantDatabaseImplement;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace AutomobilePlantDatabaseImplement.Migrations
-{
- [DbContext(typeof(AutomobilePlantDatabase))]
- partial class AutomobilePlantDatabaseModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.3")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Car", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Price")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.ToTable("Cars");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarId")
- .HasColumnType("int");
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("CarId");
-
- b.HasIndex("ComponentId");
-
- b.ToTable("CarComponents");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ClientFIO")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Clients");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cost")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.ToTable("Components");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Implementer", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ImplementerFIO")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Qualification")
- .HasColumnType("int");
-
- b.Property("WorkExperience")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("Implementers");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Order", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarId")
- .HasColumnType("int");
-
- b.Property("ClientId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("DateCreate")
- .HasColumnType("datetime2");
-
- b.Property("DateImplement")
- .HasColumnType("datetime2");
-
- b.Property("ImplementerId")
- .HasColumnType("int");
-
- b.Property("Status")
- .HasColumnType("int");
-
- b.Property("Sum")
- .HasColumnType("float");
-
- b.HasKey("Id");
-
- b.HasIndex("CarId");
-
- b.HasIndex("ClientId");
-
- b.HasIndex("ImplementerId");
-
- b.ToTable("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Shop", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Address")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("MaxCountCars")
- .HasColumnType("int");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("OpeningDate")
- .HasColumnType("datetime2");
-
- b.HasKey("Id");
-
- b.ToTable("Shops");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.ShopCar", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("CarId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("ShopId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("CarId");
-
- b.HasIndex("ShopId");
-
- b.ToTable("ShopCars");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
- {
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Car", "Car")
- .WithMany("Components")
- .HasForeignKey("CarId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Component", "Component")
- .WithMany("CarComponents")
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Car");
-
- b.Navigation("Component");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Order", b =>
- {
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Car", "Car")
- .WithMany("Orders")
- .HasForeignKey("CarId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Client", "Client")
- .WithMany("Orders")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Implementer", "Implementer")
- .WithMany("Orders")
- .HasForeignKey("ImplementerId");
-
- b.Navigation("Car");
-
- b.Navigation("Client");
-
- b.Navigation("Implementer");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.ShopCar", b =>
- {
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Car", "Car")
- .WithMany()
- .HasForeignKey("CarId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AutomobilePlantDatabaseImplement.Models.Shop", "Shop")
- .WithMany("Cars")
- .HasForeignKey("ShopId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Car");
-
- b.Navigation("Shop");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Car", b =>
- {
- b.Navigation("Components");
-
- b.Navigation("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
- {
- b.Navigation("Orders");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
- {
- b.Navigation("CarComponents");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Shop", b =>
- {
- b.Navigation("Cars");
- });
-
- modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Implementer", b =>
- {
- b.Navigation("Orders");
- });
-#pragma warning restore 612, 618
- }
- }
-}