LabWork06_Hard: Кажется готово, но тесты - не проводились
This commit is contained in:
parent
c21c408907
commit
6b465abc88
516
AutomobilePlant/AutomobilePlant/FormMain.Designer.cs
generated
516
AutomobilePlant/AutomobilePlant/FormMain.Designer.cs
generated
@ -1,4 +1,6 @@
|
|||||||
namespace AutomobilePlant
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace AutomobilePlant
|
||||||
{
|
{
|
||||||
partial class FormMain
|
partial class FormMain
|
||||||
{
|
{
|
||||||
@ -28,399 +30,225 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.menuStrip = new System.Windows.Forms.MenuStrip();
|
menuStrip = new MenuStrip();
|
||||||
this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
справочникиToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
компонентыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.автомобилиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
автомобилиToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.клиентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
клиентыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.магазиныToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
магазиныToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
исполнителиToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.списокАвтомобилейToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
отчетыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.компонентыПоАвтомобилямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
списокАвтомобилейToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.списокЗаказовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
компонентыПоАвтомобилямToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.списокМагазиновToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
списокЗаказовToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.автомобилиВМагазинахToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
списокМагазиновToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.списокЗаказовПоДатеToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
автомобилиВМагазинахToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.buttonSupplyShop = new System.Windows.Forms.Button();
|
списокЗаказовПоДатеToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
запускРаботToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.buttonCreateOrder = new System.Windows.Forms.Button();
|
dataGridView = new DataGridView();
|
||||||
this.buttonSetToWork = new System.Windows.Forms.Button();
|
buttonCreateOrder = new Button();
|
||||||
this.buttonSetToDone = new System.Windows.Forms.Button();
|
buttonSetToFinish = new Button();
|
||||||
this.buttonSetToFinish = new System.Windows.Forms.Button();
|
buttonUpdate = new Button();
|
||||||
this.buttonUpdate = new System.Windows.Forms.Button();
|
buttonSupplyShop = new Button();
|
||||||
this.buttonSellCars = new System.Windows.Forms.Button();
|
buttonSellCars = new Button();
|
||||||
this.menuStrip.SuspendLayout();
|
menuStrip.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
this.SuspendLayout();
|
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
|
// menuStrip
|
||||||
//
|
//
|
||||||
this.menuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
|
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||||
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, отчетыToolStripMenuItem, запускРаботToolStripMenuItem });
|
||||||
this.справочникиToolStripMenuItem,
|
menuStrip.Location = new Point(0, 0);
|
||||||
this.отчетыToolStripMenuItem,
|
menuStrip.Name = "menuStrip";
|
||||||
this.запускРаботToolStripMenuItem});
|
menuStrip.Size = new Size(1139, 28);
|
||||||
this.menuStrip.Location = new System.Drawing.Point(0, 0);
|
menuStrip.TabIndex = 0;
|
||||||
this.menuStrip.Name = "menuStrip";
|
menuStrip.Text = "Справочники";
|
||||||
this.menuStrip.Size = new System.Drawing.Size(1436, 28);
|
|
||||||
this.menuStrip.TabIndex = 0;
|
|
||||||
this.menuStrip.Text = "Справочники";
|
|
||||||
//
|
//
|
||||||
// справочникиToolStripMenuItem
|
// справочникиToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem, автомобилиToolStripMenuItem, клиентыToolStripMenuItem, магазиныToolStripMenuItem, исполнителиToolStripMenuItem });
|
||||||
this.компонентыToolStripMenuItem,
|
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||||
this.автомобилиToolStripMenuItem,
|
справочникиToolStripMenuItem.Size = new Size(117, 24);
|
||||||
this.клиентыToolStripMenuItem,
|
справочникиToolStripMenuItem.Text = "Справочники";
|
||||||
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
|
// компонентыToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
||||||
this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
|
компонентыToolStripMenuItem.Size = new Size(224, 26);
|
||||||
this.компонентыToolStripMenuItem.Text = "Компоненты";
|
компонентыToolStripMenuItem.Text = "Компоненты";
|
||||||
this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click);
|
компонентыToolStripMenuItem.Click += компонентыToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// автомобилиToolStripMenuItem
|
// автомобилиToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.автомобилиToolStripMenuItem.Name = "автомобилиToolStripMenuItem";
|
автомобилиToolStripMenuItem.Name = "автомобилиToolStripMenuItem";
|
||||||
this.автомобилиToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
|
автомобилиToolStripMenuItem.Size = new Size(224, 26);
|
||||||
this.автомобилиToolStripMenuItem.Text = "Автомобили";
|
автомобилиToolStripMenuItem.Text = "Автомобили";
|
||||||
this.автомобилиToolStripMenuItem.Click += new System.EventHandler(this.автомобилиToolStripMenuItem_Click);
|
автомобилиToolStripMenuItem.Click += автомобилиToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// клиентыToolStripMenuItem
|
// клиентыToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem";
|
клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem";
|
||||||
this.клиентыToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
|
клиентыToolStripMenuItem.Size = new Size(224, 26);
|
||||||
this.клиентыToolStripMenuItem.Text = "Клиенты";
|
клиентыToolStripMenuItem.Text = "Клиенты";
|
||||||
this.клиентыToolStripMenuItem.Click += new System.EventHandler(this.клиентыToolStripMenuItem_Click);
|
клиентыToolStripMenuItem.Click += клиентыToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
|
// магазиныToolStripMenuItem
|
||||||
|
//
|
||||||
|
магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
||||||
|
магазиныToolStripMenuItem.Size = new Size(224, 26);
|
||||||
|
магазиныToolStripMenuItem.Text = "Магазины";
|
||||||
|
магазиныToolStripMenuItem.Click += магазиныToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// исполнителиToolStripMenuItem
|
// исполнителиToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.исполнителиToolStripMenuItem.Name = "исполнителиToolStripMenuItem";
|
исполнителиToolStripMenuItem.Name = "исполнителиToolStripMenuItem";
|
||||||
this.исполнителиToolStripMenuItem.Size = new System.Drawing.Size(185, 26);
|
исполнителиToolStripMenuItem.Size = new Size(224, 26);
|
||||||
this.исполнителиToolStripMenuItem.Text = "Исполнители";
|
исполнителиToolStripMenuItem.Text = "Исполнители";
|
||||||
this.исполнителиToolStripMenuItem.Click += new System.EventHandler(this.исполнителиToolStripMenuItem_Click);
|
исполнителиToolStripMenuItem.Click += исполнителиToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// отчетыToolStripMenuItem
|
// отчетыToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
отчетыToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { списокАвтомобилейToolStripMenuItem, компонентыПоАвтомобилямToolStripMenuItem, списокЗаказовToolStripMenuItem, списокМагазиновToolStripMenuItem, автомобилиВМагазинахToolStripMenuItem, списокЗаказовПоДатеToolStripMenuItem });
|
||||||
this.списокАвтомобилейToolStripMenuItem,
|
отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
|
||||||
this.компонентыПоАвтомобилямToolStripMenuItem,
|
отчетыToolStripMenuItem.Size = new Size(73, 24);
|
||||||
this.списокЗаказовToolStripMenuItem,
|
отчетыToolStripMenuItem.Text = "Отчеты";
|
||||||
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
|
// списокАвтомобилейToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.списокАвтомобилейToolStripMenuItem.Name = "списокАвтомобилейToolStripMenuItem";
|
списокАвтомобилейToolStripMenuItem.Name = "списокАвтомобилейToolStripMenuItem";
|
||||||
this.списокАвтомобилейToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
|
списокАвтомобилейToolStripMenuItem.Size = new Size(259, 26);
|
||||||
this.списокАвтомобилейToolStripMenuItem.Text = "Список автомобилей";
|
списокАвтомобилейToolStripMenuItem.Text = "Список автомобилей";
|
||||||
this.списокАвтомобилейToolStripMenuItem.Click += new System.EventHandler(this.списокАвтомобилейToolStripMenuItem_Click);
|
списокАвтомобилейToolStripMenuItem.Click += списокАвтомобилейToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// компонентыПоАвтомобилямToolStripMenuItem
|
// компонентыПоАвтомобилямToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.компонентыПоАвтомобилямToolStripMenuItem.Name = "компонентыПоАвтомобилямToolStripMenuItem";
|
компонентыПоАвтомобилямToolStripMenuItem.Name = "компонентыПоАвтомобилямToolStripMenuItem";
|
||||||
this.компонентыПоАвтомобилямToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
|
компонентыПоАвтомобилямToolStripMenuItem.Size = new Size(259, 26);
|
||||||
this.компонентыПоАвтомобилямToolStripMenuItem.Text = "Компоненты по автомобилям";
|
компонентыПоАвтомобилямToolStripMenuItem.Text = "Бланки по документам";
|
||||||
this.компонентыПоАвтомобилямToolStripMenuItem.Click += new System.EventHandler(this.компонентыПоАвтомобилямToolStripMenuItem_Click);
|
компонентыПоАвтомобилямToolStripMenuItem.Click += компонентыПоАвтомобилямToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// списокЗаказовToolStripMenuItem
|
// списокЗаказовToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
|
списокЗаказовToolStripMenuItem.Name = "списокЗаказовToolStripMenuItem";
|
||||||
this.списокЗаказовToolStripMenuItem.Size = new System.Drawing.Size(304, 26);
|
списокЗаказовToolStripMenuItem.Size = new Size(259, 26);
|
||||||
this.списокЗаказовToolStripMenuItem.Text = "Список заказов";
|
списокЗаказовToolStripMenuItem.Text = "Список заказов";
|
||||||
this.списокЗаказовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказовToolStripMenuItem_Click);
|
списокЗаказов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
|
// запускРаботToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.запускРаботToolStripMenuItem.Name = "запускРаботToolStripMenuItem";
|
запускРаботToolStripMenuItem.Name = "запускРаботToolStripMenuItem";
|
||||||
this.запускРаботToolStripMenuItem.Size = new System.Drawing.Size(114, 24);
|
запускРаботToolStripMenuItem.Size = new Size(125, 24);
|
||||||
this.запускРаботToolStripMenuItem.Text = "Запуск работ";
|
запускРаботToolStripMenuItem.Text = "Запуск работы";
|
||||||
this.запускРаботToolStripMenuItem.Click += new System.EventHandler(this.запускРаботToolStripMenuItem_Click);
|
запускРаботToolStripMenuItem.Click += запускРаботToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// dataGridView
|
// dataGridView
|
||||||
//
|
//
|
||||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dataGridView.Location = new System.Drawing.Point(12, 31);
|
dataGridView.Location = new Point(12, 31);
|
||||||
this.dataGridView.Name = "dataGridView";
|
dataGridView.Name = "dataGridView";
|
||||||
this.dataGridView.RowHeadersWidth = 51;
|
dataGridView.RowHeadersWidth = 51;
|
||||||
this.dataGridView.RowTemplate.Height = 29;
|
dataGridView.RowTemplate.Height = 29;
|
||||||
this.dataGridView.Size = new System.Drawing.Size(1188, 407);
|
dataGridView.Size = new Size(915, 407);
|
||||||
this.dataGridView.TabIndex = 1;
|
dataGridView.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// buttonCreateOrder
|
// buttonCreateOrder
|
||||||
//
|
//
|
||||||
this.buttonCreateOrder.Location = new System.Drawing.Point(1220, 42);
|
buttonCreateOrder.Location = new Point(933, 45);
|
||||||
this.buttonCreateOrder.Name = "buttonCreateOrder";
|
buttonCreateOrder.Name = "buttonCreateOrder";
|
||||||
this.buttonCreateOrder.Size = new System.Drawing.Size(194, 29);
|
buttonCreateOrder.Size = new Size(194, 29);
|
||||||
this.buttonCreateOrder.TabIndex = 2;
|
buttonCreateOrder.TabIndex = 2;
|
||||||
this.buttonCreateOrder.Text = "Создать заказ";
|
buttonCreateOrder.Text = "Создать заказ";
|
||||||
this.buttonCreateOrder.UseVisualStyleBackColor = true;
|
buttonCreateOrder.UseVisualStyleBackColor = true;
|
||||||
this.buttonCreateOrder.Click += new System.EventHandler(this.ButtonCreateOrder_Click);
|
buttonCreateOrder.Click += ButtonCreateOrder_Click;
|
||||||
//
|
//
|
||||||
// buttonSetToFinish
|
// buttonSetToFinish
|
||||||
//
|
//
|
||||||
this.buttonSetToFinish.Location = new System.Drawing.Point(1220, 147);
|
buttonSetToFinish.Location = new Point(933, 80);
|
||||||
this.buttonSetToFinish.Name = "buttonSetToFinish";
|
buttonSetToFinish.Name = "buttonSetToFinish";
|
||||||
this.buttonSetToFinish.Size = new System.Drawing.Size(194, 29);
|
buttonSetToFinish.Size = new Size(194, 29);
|
||||||
this.buttonSetToFinish.TabIndex = 5;
|
buttonSetToFinish.TabIndex = 5;
|
||||||
this.buttonSetToFinish.Text = "Заказ выдан";
|
buttonSetToFinish.Text = "Заказ выдан";
|
||||||
this.buttonSetToFinish.UseVisualStyleBackColor = true;
|
buttonSetToFinish.UseVisualStyleBackColor = true;
|
||||||
this.buttonSetToFinish.Click += new System.EventHandler(this.ButtonSetToFinish_Click);
|
buttonSetToFinish.Click += ButtonSetToFinish_Click;
|
||||||
//
|
//
|
||||||
// buttonUpdate
|
// buttonUpdate
|
||||||
//
|
//
|
||||||
this.buttonUpdate.Location = new System.Drawing.Point(1220, 409);
|
buttonUpdate.Location = new Point(933, 410);
|
||||||
this.buttonUpdate.Name = "buttonUpdate";
|
buttonUpdate.Name = "buttonUpdate";
|
||||||
this.buttonUpdate.Size = new System.Drawing.Size(194, 29);
|
buttonUpdate.Size = new Size(194, 29);
|
||||||
this.buttonUpdate.TabIndex = 6;
|
buttonUpdate.TabIndex = 6;
|
||||||
this.buttonUpdate.Text = "Обновить";
|
buttonUpdate.Text = "Обновить";
|
||||||
this.buttonUpdate.UseVisualStyleBackColor = true;
|
buttonUpdate.UseVisualStyleBackColor = true;
|
||||||
this.buttonUpdate.Click += new System.EventHandler(this.ButtonUpdate_Click);
|
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
|
// FormMain
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(1436, 450);
|
ClientSize = new Size(1139, 450);
|
||||||
this.Controls.Add(this.buttonUpdate);
|
Controls.Add(buttonSellCars);
|
||||||
this.Controls.Add(this.buttonSetToFinish);
|
Controls.Add(buttonSupplyShop);
|
||||||
this.Controls.Add(this.buttonCreateOrder);
|
Controls.Add(buttonUpdate);
|
||||||
this.Controls.Add(this.dataGridView);
|
Controls.Add(buttonSetToFinish);
|
||||||
this.Controls.Add(this.menuStrip);
|
Controls.Add(buttonCreateOrder);
|
||||||
this.MainMenuStrip = this.menuStrip;
|
Controls.Add(dataGridView);
|
||||||
this.Name = "FormMain";
|
Controls.Add(menuStrip);
|
||||||
this.Text = "Автомобильный завод";
|
MainMenuStrip = menuStrip;
|
||||||
this.Load += new System.EventHandler(this.FormMain_Load);
|
Name = "FormMain";
|
||||||
this.menuStrip.ResumeLayout(false);
|
Text = "Автомобильный завод";
|
||||||
this.menuStrip.PerformLayout();
|
Load += FormMain_Load;
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
menuStrip.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
menuStrip.PerformLayout();
|
||||||
this.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;
|
private ToolStripMenuItem компонентыToolStripMenuItem;
|
||||||
private ToolStripMenuItem автомобилиToolStripMenuItem;
|
private ToolStripMenuItem автомобилиToolStripMenuItem;
|
||||||
|
@ -80,7 +80,7 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
}
|
}
|
||||||
|
|
||||||
CheckModel(model, false);
|
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.");
|
_logger.LogWarning("Status update to " + newStatus.ToString() + " operation failed. Order status incorrect.");
|
||||||
return false;
|
return false;
|
||||||
@ -96,8 +96,10 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
if (CheckThenSupplyMany(car, model.Count) == false)
|
if (CheckThenSupplyMany(car, model.Count) == false)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Status update to " + newStatus.ToString() + " operation failed. Shop supply error.");
|
_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;
|
model.Status = newStatus;
|
||||||
if (model.Status == OrderStatus.Выдан) model.DateImplement = DateTime.Now;
|
if (model.Status == OrderStatus.Выдан) model.DateImplement = DateTime.Now;
|
||||||
|
@ -36,6 +36,11 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var orders = _orderLogic.ReadList(new OrderSearchModel { Status = OrderStatus.Принят });
|
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)
|
if (orders == null || orders.Count == 0)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("DoWork. Orders is null or empty");
|
_logger.LogWarning("DoWork. Orders is null or empty");
|
||||||
@ -54,7 +59,9 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await RunOrderInWork(implementer);
|
await RunWaitingOrder(implementer);
|
||||||
|
|
||||||
|
await RunOrderInWork(implementer);
|
||||||
|
|
||||||
await Task.Run(() =>
|
await Task.Run(() =>
|
||||||
{
|
{
|
||||||
@ -106,6 +113,7 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// Выбираем из всех заказов тот, который выполняется данным исполнителем
|
||||||
var runOrder = await Task.Run(() => _orderLogic.ReadElement(new OrderSearchModel
|
var runOrder = await Task.Run(() => _orderLogic.ReadElement(new OrderSearchModel
|
||||||
{
|
{
|
||||||
ImplementerId = implementer.Id,
|
ImplementerId = implementer.Id,
|
||||||
@ -121,7 +129,8 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
_logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, runOrder.Id);
|
_logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, runOrder.Id);
|
||||||
_orderLogic.DeliveryOrder(new OrderBindingModel
|
_orderLogic.DeliveryOrder(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = runOrder.Id
|
Id = runOrder.Id,
|
||||||
|
ImplementerId = implementer.Id
|
||||||
});
|
});
|
||||||
// отдыхаем
|
// отдыхаем
|
||||||
Thread.Sleep(implementer.Qualification * _rnd.Next(10, 100));
|
Thread.Sleep(implementer.Qualification * _rnd.Next(10, 100));
|
||||||
@ -138,5 +147,41 @@ namespace AutomobilePlantBusinessLogic.BusinessLogics
|
|||||||
throw;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,5 +13,6 @@ namespace AutomobilePlantDataModels.Enums
|
|||||||
Выполняется = 1,
|
Выполняется = 1,
|
||||||
Готов = 2,
|
Готов = 2,
|
||||||
Выдан = 3,
|
Выдан = 3,
|
||||||
}
|
Ожидание = 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,257 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
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
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
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<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("CarName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<double>("Price")
|
|
||||||
.HasColumnType("float");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Cars");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CarId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("ComponentId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Count")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("CarId");
|
|
||||||
|
|
||||||
b.HasIndex("ComponentId");
|
|
||||||
|
|
||||||
b.ToTable("CarComponents");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClientFIO")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Password")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Clients");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ComponentName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<double>("Cost")
|
|
||||||
.HasColumnType("float");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Components");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.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("AutomobilePlantDatabaseImplement.Models.Order", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CarId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Count")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateCreate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("DateImplement")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<int?>("ImplementerId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Status")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<double>("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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AutomobilePlantDatabaseImplement.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class implementor : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "ImplementerId",
|
|
||||||
table: "Orders",
|
|
||||||
type: "int",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
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.CreateIndex(
|
|
||||||
name: "IX_Orders_ImplementerId",
|
|
||||||
table: "Orders",
|
|
||||||
column: "ImplementerId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Orders_Implementers_ImplementerId",
|
|
||||||
table: "Orders",
|
|
||||||
column: "ImplementerId",
|
|
||||||
principalTable: "Implementers",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,291 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
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
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
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<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("CarName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<double>("Price")
|
|
||||||
.HasColumnType("float");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Cars");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CarId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("ComponentId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Count")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("CarId");
|
|
||||||
|
|
||||||
b.HasIndex("ComponentId");
|
|
||||||
|
|
||||||
b.ToTable("CarComponents");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClientFIO")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Password")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Clients");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ComponentName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<double>("Cost")
|
|
||||||
.HasColumnType("float");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Components");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Order", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CarId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Count")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateCreate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("DateImplement")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<int>("Status")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<double>("Sum")
|
|
||||||
.HasColumnType("float");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("CarId");
|
|
||||||
|
|
||||||
b.HasIndex("ClientId");
|
|
||||||
|
|
||||||
b.ToTable("Orders");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Shop", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Address")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("MaxCountCars")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("OpeningDate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Shops");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.ShopCar", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CarId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Count")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,214 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace AutomobilePlantDatabaseImplement.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class labfivehard : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Cars",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
CarName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Price = table.Column<double>(type: "float", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Cars", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Clients",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
ClientFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Password = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Clients", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Components",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
ComponentName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Cost = table.Column<double>(type: "float", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Components", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Shops",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
Address = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
||||||
OpeningDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
MaxCountCars = table.Column<int>(type: "int", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Shops", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Orders",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
CarId = table.Column<int>(type: "int", nullable: false),
|
|
||||||
ClientId = 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),
|
|
||||||
DateCreate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
||||||
DateImplement = table.Column<DateTime>(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<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
CarId = table.Column<int>(type: "int", nullable: false),
|
|
||||||
ComponentId = table.Column<int>(type: "int", nullable: false),
|
|
||||||
Count = table.Column<int>(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<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
CarId = table.Column<int>(type: "int", nullable: false),
|
|
||||||
ShopId = table.Column<int>(type: "int", nullable: false),
|
|
||||||
Count = table.Column<int>(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");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,331 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
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<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("CarName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<double>("Price")
|
|
||||||
.HasColumnType("float");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Cars");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.CarComponent", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CarId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("ComponentId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Count")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("CarId");
|
|
||||||
|
|
||||||
b.HasIndex("ComponentId");
|
|
||||||
|
|
||||||
b.ToTable("CarComponents");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Client", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClientFIO")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Password")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Clients");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.Component", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ComponentName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<double>("Cost")
|
|
||||||
.HasColumnType("float");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Components");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.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("AutomobilePlantDatabaseImplement.Models.Order", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CarId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("ClientId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Count")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<DateTime>("DateCreate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("DateImplement")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<int?>("ImplementerId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Status")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<double>("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<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Address")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("MaxCountCars")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("OpeningDate")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Shops");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("AutomobilePlantDatabaseImplement.Models.ShopCar", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CarId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("Count")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user