Изменения для работы лабы.
This commit is contained in:
parent
bfb6dca8e7
commit
80c29c8e5c
@ -1,282 +1,286 @@
|
||||
namespace BlacksmithWorkshop
|
||||
{
|
||||
partial class FormMain
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
partial class FormMain
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
dataGridView = new DataGridView();
|
||||
buttonCreateOrder = new Button();
|
||||
buttonIssuedOrder = new Button();
|
||||
buttonRef = new Button();
|
||||
menuStrip = new MenuStrip();
|
||||
toolStripMenuItem = new ToolStripMenuItem();
|
||||
workPieceToolStripMenuItem = new ToolStripMenuItem();
|
||||
manufactureToolStripMenuItem = new ToolStripMenuItem();
|
||||
shopToolStripMenuItem = new ToolStripMenuItem();
|
||||
addManufactureToolStripMenuItem = new ToolStripMenuItem();
|
||||
reportToolStripMenuItem = new ToolStripMenuItem();
|
||||
groupedOrdersReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
ordersReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
workloadStoresReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
shopsReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
reportManufactureToolStripMenuItem = new ToolStripMenuItem();
|
||||
workPieceManufacturesToolStripMenuItem = new ToolStripMenuItem();
|
||||
buttonSellManufacture = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
menuStrip.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Location = new Point(11, 36);
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.RowTemplate.Height = 29;
|
||||
dataGridView.Size = new Size(937, 448);
|
||||
dataGridView.TabIndex = 0;
|
||||
//
|
||||
// buttonCreateOrder
|
||||
//
|
||||
buttonCreateOrder.Location = new Point(1014, 67);
|
||||
buttonCreateOrder.Name = "buttonCreateOrder";
|
||||
buttonCreateOrder.Size = new Size(235, 29);
|
||||
buttonCreateOrder.TabIndex = 1;
|
||||
buttonCreateOrder.Text = "Создать заказ";
|
||||
buttonCreateOrder.UseVisualStyleBackColor = true;
|
||||
buttonCreateOrder.Click += ButtonCreateOrder_Click;
|
||||
//
|
||||
// buttonTakeOrderInWork
|
||||
//
|
||||
buttonTakeOrderInWork.Location = new Point(1014, 143);
|
||||
buttonTakeOrderInWork.Name = "buttonTakeOrderInWork";
|
||||
buttonTakeOrderInWork.Size = new Size(235, 29);
|
||||
buttonTakeOrderInWork.TabIndex = 2;
|
||||
buttonTakeOrderInWork.Text = "Отдать на выполнение";
|
||||
buttonTakeOrderInWork.UseVisualStyleBackColor = true;
|
||||
buttonTakeOrderInWork.Click += ButtonTakeOrderInWork_Click;
|
||||
//
|
||||
// buttonOrderReady
|
||||
//
|
||||
buttonOrderReady.Location = new Point(1014, 220);
|
||||
buttonOrderReady.Name = "buttonOrderReady";
|
||||
buttonOrderReady.Size = new Size(235, 29);
|
||||
buttonOrderReady.TabIndex = 3;
|
||||
buttonOrderReady.Text = "Заказ готов";
|
||||
buttonOrderReady.UseVisualStyleBackColor = true;
|
||||
buttonOrderReady.Click += ButtonOrderReady_Click;
|
||||
//
|
||||
// buttonIssuedOrder
|
||||
//
|
||||
buttonIssuedOrder.Location = new Point(1014, 296);
|
||||
buttonIssuedOrder.Name = "buttonIssuedOrder";
|
||||
buttonIssuedOrder.Size = new Size(235, 29);
|
||||
buttonIssuedOrder.TabIndex = 4;
|
||||
buttonIssuedOrder.Text = "Заказ выдан";
|
||||
buttonIssuedOrder.UseVisualStyleBackColor = true;
|
||||
buttonIssuedOrder.Click += ButtonIssuedOrder_Click;
|
||||
//
|
||||
// buttonRef
|
||||
//
|
||||
buttonRef.Location = new Point(1014, 369);
|
||||
buttonRef.Name = "buttonRef";
|
||||
buttonRef.Size = new Size(235, 29);
|
||||
buttonRef.TabIndex = 5;
|
||||
buttonRef.Text = "Обновить";
|
||||
buttonRef.UseVisualStyleBackColor = true;
|
||||
buttonRef.Click += ButtonRef_Click;
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||
menuStrip.Items.AddRange(new ToolStripItem[] { toolStripMenuItem, reportToolStripMenuItem });
|
||||
menuStrip.Location = new Point(0, 0);
|
||||
menuStrip.Name = "menuStrip";
|
||||
menuStrip.Padding = new Padding(6, 3, 0, 3);
|
||||
menuStrip.Size = new Size(1297, 30);
|
||||
menuStrip.TabIndex = 6;
|
||||
menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// toolStripMenuItem
|
||||
//
|
||||
toolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { workPieceToolStripMenuItem, manufactureToolStripMenuItem, shopToolStripMenuItem, addManufactureToolStripMenuItem });
|
||||
toolStripMenuItem.Name = "toolStripMenuItem";
|
||||
toolStripMenuItem.Size = new Size(117, 24);
|
||||
toolStripMenuItem.Text = "Справочники";
|
||||
//
|
||||
// workPieceToolStripMenuItem
|
||||
//
|
||||
workPieceToolStripMenuItem.Name = "workPieceToolStripMenuItem";
|
||||
workPieceToolStripMenuItem.Size = new Size(251, 26);
|
||||
workPieceToolStripMenuItem.Text = "Заготовки";
|
||||
workPieceToolStripMenuItem.Click += WorkPieceToolStripMenuItem_Click;
|
||||
//
|
||||
// manufactureToolStripMenuItem
|
||||
//
|
||||
manufactureToolStripMenuItem.Name = "manufactureToolStripMenuItem";
|
||||
manufactureToolStripMenuItem.Size = new Size(251, 26);
|
||||
manufactureToolStripMenuItem.Text = "Изделия";
|
||||
manufactureToolStripMenuItem.Click += ManufactureToolStripMenuItem_Click;
|
||||
//
|
||||
// shopToolStripMenuItem
|
||||
//
|
||||
shopToolStripMenuItem.Name = "shopToolStripMenuItem";
|
||||
shopToolStripMenuItem.Size = new Size(251, 26);
|
||||
shopToolStripMenuItem.Text = "Магазины";
|
||||
shopToolStripMenuItem.Click += ShopToolStripMenuItem_Click;
|
||||
//
|
||||
// addManufactureToolStripMenuItem
|
||||
//
|
||||
addManufactureToolStripMenuItem.Name = "addManufactureToolStripMenuItem";
|
||||
addManufactureToolStripMenuItem.Size = new Size(251, 26);
|
||||
addManufactureToolStripMenuItem.Text = "Пополнение магазина";
|
||||
addManufactureToolStripMenuItem.Click += AddManufactureToolStripMenuItem_Click;
|
||||
//
|
||||
// reportToolStripMenuItem
|
||||
//
|
||||
reportToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { groupedOrdersReportToolStripMenuItem, ordersReportToolStripMenuItem, workloadStoresReportToolStripMenuItem, shopsReportToolStripMenuItem, reportManufactureToolStripMenuItem, workPieceManufacturesToolStripMenuItem });
|
||||
reportToolStripMenuItem.Name = "reportToolStripMenuItem";
|
||||
reportToolStripMenuItem.Size = new Size(73, 24);
|
||||
reportToolStripMenuItem.Text = "Отчёты";
|
||||
//
|
||||
// groupedOrdersReportToolStripMenuItem
|
||||
//
|
||||
groupedOrdersReportToolStripMenuItem.Name = "groupedOrdersReportToolStripMenuItem";
|
||||
groupedOrdersReportToolStripMenuItem.Size = new Size(310, 26);
|
||||
groupedOrdersReportToolStripMenuItem.Text = "Список заказов за весь период";
|
||||
groupedOrdersReportToolStripMenuItem.Click += GroupedOrdersReportToolStripMenuItem_Click;
|
||||
//
|
||||
// ordersReportToolStripMenuItem
|
||||
//
|
||||
ordersReportToolStripMenuItem.Name = "ordersReportToolStripMenuItem";
|
||||
ordersReportToolStripMenuItem.Size = new Size(310, 26);
|
||||
ordersReportToolStripMenuItem.Text = "Список заказов";
|
||||
ordersReportToolStripMenuItem.Click += OrdersReportToolStripMenuItem_Click;
|
||||
//
|
||||
// workloadStoresReportToolStripMenuItem
|
||||
//
|
||||
workloadStoresReportToolStripMenuItem.Name = "workloadStoresReportToolStripMenuItem";
|
||||
workloadStoresReportToolStripMenuItem.Size = new Size(310, 26);
|
||||
workloadStoresReportToolStripMenuItem.Text = "Загруженность магазинов";
|
||||
workloadStoresReportToolStripMenuItem.Click += WorkloadStoresReportToolStripMenuItem_Click;
|
||||
//
|
||||
// shopsReportToolStripMenuItem
|
||||
//
|
||||
shopsReportToolStripMenuItem.Name = "shopsReportToolStripMenuItem";
|
||||
shopsReportToolStripMenuItem.Size = new Size(310, 26);
|
||||
shopsReportToolStripMenuItem.Text = "Таблица магазинов";
|
||||
shopsReportToolStripMenuItem.Click += ShopsReportToolStripMenuItem_Click;
|
||||
//
|
||||
// reportManufactureToolStripMenuItem
|
||||
//
|
||||
reportManufactureToolStripMenuItem.Name = "reportManufactureToolStripMenuItem";
|
||||
reportManufactureToolStripMenuItem.Size = new Size(310, 26);
|
||||
reportManufactureToolStripMenuItem.Text = "Список изделий";
|
||||
reportManufactureToolStripMenuItem.Click += ReportManufactureToolStripMenuItem_Click;
|
||||
//
|
||||
// workPieceManufacturesToolStripMenuItem
|
||||
//
|
||||
workPieceManufacturesToolStripMenuItem.Name = "workPieceManufacturesToolStripMenuItem";
|
||||
workPieceManufacturesToolStripMenuItem.Size = new Size(310, 26);
|
||||
workPieceManufacturesToolStripMenuItem.Text = "Заготовки по изделиям";
|
||||
workPieceManufacturesToolStripMenuItem.Click += WorkPieceManufacturesToolStripMenuItem_Click;
|
||||
//
|
||||
// buttonSellManufacture
|
||||
//
|
||||
buttonSellManufacture.Location = new Point(1014, 440);
|
||||
buttonSellManufacture.Name = "buttonSellManufacture";
|
||||
buttonSellManufacture.Size = new Size(233, 29);
|
||||
buttonSellManufacture.TabIndex = 7;
|
||||
buttonSellManufacture.Text = "Продажа изделий";
|
||||
buttonSellManufacture.UseVisualStyleBackColor = true;
|
||||
buttonSellManufacture.Click += ButtonSellManufacture_Click;
|
||||
//
|
||||
// startingWorkToolStripMenuItem
|
||||
//
|
||||
startingWorkToolStripMenuItem.Name = "startingWorkToolStripMenuItem";
|
||||
startingWorkToolStripMenuItem.Size = new Size(114, 24);
|
||||
startingWorkToolStripMenuItem.Text = "Запуск работ";
|
||||
startingWorkToolStripMenuItem.Click += StartingWorkToolStripMenuItem_Click;
|
||||
//
|
||||
// работаСИсполнителямиToolStripMenuItem
|
||||
//
|
||||
работаСИсполнителямиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { implementerToolStripMenuItem });
|
||||
работаСИсполнителямиToolStripMenuItem.Name = "работаСИсполнителямиToolStripMenuItem";
|
||||
работаСИсполнителямиToolStripMenuItem.Size = new Size(196, 24);
|
||||
работаСИсполнителямиToolStripMenuItem.Text = "Работа с исполнителями";
|
||||
//
|
||||
// implementerToolStripMenuItem
|
||||
//
|
||||
implementerToolStripMenuItem.Name = "implementerToolStripMenuItem";
|
||||
implementerToolStripMenuItem.Size = new Size(224, 26);
|
||||
implementerToolStripMenuItem.Text = "Исполнители";
|
||||
implementerToolStripMenuItem.Click += ImplementerToolStripMenuItem_Click;
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1297, 496);
|
||||
Controls.Add(buttonSellManufacture);
|
||||
Controls.Add(buttonRef);
|
||||
Controls.Add(buttonIssuedOrder);
|
||||
Controls.Add(buttonCreateOrder);
|
||||
Controls.Add(dataGridView);
|
||||
Controls.Add(menuStrip);
|
||||
MainMenuStrip = menuStrip;
|
||||
Name = "FormMain";
|
||||
Text = "Кузнечная мастерская";
|
||||
Load += FormMain_Load;
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
menuStrip.ResumeLayout(false);
|
||||
menuStrip.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
dataGridView = new DataGridView();
|
||||
buttonCreateOrder = new Button();
|
||||
buttonIssuedOrder = new Button();
|
||||
buttonRef = new Button();
|
||||
menuStrip = new MenuStrip();
|
||||
toolStripMenuItem = new ToolStripMenuItem();
|
||||
workPieceToolStripMenuItem = new ToolStripMenuItem();
|
||||
manufactureToolStripMenuItem = new ToolStripMenuItem();
|
||||
shopToolStripMenuItem = new ToolStripMenuItem();
|
||||
addManufactureToolStripMenuItem = new ToolStripMenuItem();
|
||||
reportToolStripMenuItem = new ToolStripMenuItem();
|
||||
groupedOrdersReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
ordersReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
workloadStoresReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
shopsReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
reportManufactureToolStripMenuItem = new ToolStripMenuItem();
|
||||
workPieceManufacturesToolStripMenuItem = new ToolStripMenuItem();
|
||||
workWithImplementerToolStripMenuItem = new ToolStripMenuItem();
|
||||
implementerToolStripMenuItem = new ToolStripMenuItem();
|
||||
работаСКлиентамиToolStripMenuItem = new ToolStripMenuItem();
|
||||
clientsToolStripMenuItem = new ToolStripMenuItem();
|
||||
startWorkToolStripMenuItem = new ToolStripMenuItem();
|
||||
buttonSellManufacture = new Button();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
menuStrip.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView.Location = new Point(11, 36);
|
||||
dataGridView.Name = "dataGridView";
|
||||
dataGridView.RowHeadersWidth = 51;
|
||||
dataGridView.RowTemplate.Height = 29;
|
||||
dataGridView.Size = new Size(937, 448);
|
||||
dataGridView.TabIndex = 0;
|
||||
//
|
||||
// buttonCreateOrder
|
||||
//
|
||||
buttonCreateOrder.Location = new Point(1014, 67);
|
||||
buttonCreateOrder.Name = "buttonCreateOrder";
|
||||
buttonCreateOrder.Size = new Size(235, 29);
|
||||
buttonCreateOrder.TabIndex = 1;
|
||||
buttonCreateOrder.Text = "Создать заказ";
|
||||
buttonCreateOrder.UseVisualStyleBackColor = true;
|
||||
buttonCreateOrder.Click += ButtonCreateOrder_Click;
|
||||
//
|
||||
// buttonIssuedOrder
|
||||
//
|
||||
buttonIssuedOrder.Location = new Point(1014, 141);
|
||||
buttonIssuedOrder.Name = "buttonIssuedOrder";
|
||||
buttonIssuedOrder.Size = new Size(235, 29);
|
||||
buttonIssuedOrder.TabIndex = 4;
|
||||
buttonIssuedOrder.Text = "Заказ выдан";
|
||||
buttonIssuedOrder.UseVisualStyleBackColor = true;
|
||||
buttonIssuedOrder.Click += ButtonIssuedOrder_Click;
|
||||
//
|
||||
// buttonRef
|
||||
//
|
||||
buttonRef.Location = new Point(1014, 214);
|
||||
buttonRef.Name = "buttonRef";
|
||||
buttonRef.Size = new Size(235, 29);
|
||||
buttonRef.TabIndex = 5;
|
||||
buttonRef.Text = "Обновить";
|
||||
buttonRef.UseVisualStyleBackColor = true;
|
||||
buttonRef.Click += ButtonRef_Click;
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
menuStrip.ImageScalingSize = new Size(20, 20);
|
||||
menuStrip.Items.AddRange(new ToolStripItem[] { toolStripMenuItem, reportToolStripMenuItem, workWithImplementerToolStripMenuItem, работаСКлиентамиToolStripMenuItem, startWorkToolStripMenuItem });
|
||||
menuStrip.Location = new Point(0, 0);
|
||||
menuStrip.Name = "menuStrip";
|
||||
menuStrip.Padding = new Padding(6, 3, 0, 3);
|
||||
menuStrip.Size = new Size(1297, 30);
|
||||
menuStrip.TabIndex = 6;
|
||||
menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
// toolStripMenuItem
|
||||
//
|
||||
toolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { workPieceToolStripMenuItem, manufactureToolStripMenuItem, shopToolStripMenuItem, addManufactureToolStripMenuItem });
|
||||
toolStripMenuItem.Name = "toolStripMenuItem";
|
||||
toolStripMenuItem.Size = new Size(117, 24);
|
||||
toolStripMenuItem.Text = "Справочники";
|
||||
//
|
||||
// workPieceToolStripMenuItem
|
||||
//
|
||||
workPieceToolStripMenuItem.Name = "workPieceToolStripMenuItem";
|
||||
workPieceToolStripMenuItem.Size = new Size(251, 26);
|
||||
workPieceToolStripMenuItem.Text = "Заготовки";
|
||||
workPieceToolStripMenuItem.Click += WorkPieceToolStripMenuItem_Click;
|
||||
//
|
||||
// manufactureToolStripMenuItem
|
||||
//
|
||||
manufactureToolStripMenuItem.Name = "manufactureToolStripMenuItem";
|
||||
manufactureToolStripMenuItem.Size = new Size(251, 26);
|
||||
manufactureToolStripMenuItem.Text = "Изделия";
|
||||
manufactureToolStripMenuItem.Click += ManufactureToolStripMenuItem_Click;
|
||||
//
|
||||
// shopToolStripMenuItem
|
||||
//
|
||||
shopToolStripMenuItem.Name = "shopToolStripMenuItem";
|
||||
shopToolStripMenuItem.Size = new Size(251, 26);
|
||||
shopToolStripMenuItem.Text = "Магазины";
|
||||
shopToolStripMenuItem.Click += ShopToolStripMenuItem_Click;
|
||||
//
|
||||
// addManufactureToolStripMenuItem
|
||||
//
|
||||
addManufactureToolStripMenuItem.Name = "addManufactureToolStripMenuItem";
|
||||
addManufactureToolStripMenuItem.Size = new Size(251, 26);
|
||||
addManufactureToolStripMenuItem.Text = "Пополнение магазина";
|
||||
addManufactureToolStripMenuItem.Click += AddManufactureToolStripMenuItem_Click;
|
||||
//
|
||||
// reportToolStripMenuItem
|
||||
//
|
||||
reportToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { groupedOrdersReportToolStripMenuItem, ordersReportToolStripMenuItem, workloadStoresReportToolStripMenuItem, shopsReportToolStripMenuItem, reportManufactureToolStripMenuItem, workPieceManufacturesToolStripMenuItem });
|
||||
reportToolStripMenuItem.Name = "reportToolStripMenuItem";
|
||||
reportToolStripMenuItem.Size = new Size(73, 24);
|
||||
reportToolStripMenuItem.Text = "Отчёты";
|
||||
//
|
||||
// groupedOrdersReportToolStripMenuItem
|
||||
//
|
||||
groupedOrdersReportToolStripMenuItem.Name = "groupedOrdersReportToolStripMenuItem";
|
||||
groupedOrdersReportToolStripMenuItem.Size = new Size(310, 26);
|
||||
groupedOrdersReportToolStripMenuItem.Text = "Список заказов за весь период";
|
||||
groupedOrdersReportToolStripMenuItem.Click += GroupedOrdersReportToolStripMenuItem_Click;
|
||||
//
|
||||
// ordersReportToolStripMenuItem
|
||||
//
|
||||
ordersReportToolStripMenuItem.Name = "ordersReportToolStripMenuItem";
|
||||
ordersReportToolStripMenuItem.Size = new Size(310, 26);
|
||||
ordersReportToolStripMenuItem.Text = "Список заказов";
|
||||
ordersReportToolStripMenuItem.Click += OrdersReportToolStripMenuItem_Click;
|
||||
//
|
||||
// workloadStoresReportToolStripMenuItem
|
||||
//
|
||||
workloadStoresReportToolStripMenuItem.Name = "workloadStoresReportToolStripMenuItem";
|
||||
workloadStoresReportToolStripMenuItem.Size = new Size(310, 26);
|
||||
workloadStoresReportToolStripMenuItem.Text = "Загруженность магазинов";
|
||||
workloadStoresReportToolStripMenuItem.Click += WorkloadStoresReportToolStripMenuItem_Click;
|
||||
//
|
||||
// shopsReportToolStripMenuItem
|
||||
//
|
||||
shopsReportToolStripMenuItem.Name = "shopsReportToolStripMenuItem";
|
||||
shopsReportToolStripMenuItem.Size = new Size(310, 26);
|
||||
shopsReportToolStripMenuItem.Text = "Таблица магазинов";
|
||||
shopsReportToolStripMenuItem.Click += ShopsReportToolStripMenuItem_Click;
|
||||
//
|
||||
// reportManufactureToolStripMenuItem
|
||||
//
|
||||
reportManufactureToolStripMenuItem.Name = "reportManufactureToolStripMenuItem";
|
||||
reportManufactureToolStripMenuItem.Size = new Size(310, 26);
|
||||
reportManufactureToolStripMenuItem.Text = "Список изделий";
|
||||
reportManufactureToolStripMenuItem.Click += ReportManufactureToolStripMenuItem_Click;
|
||||
//
|
||||
// workPieceManufacturesToolStripMenuItem
|
||||
//
|
||||
workPieceManufacturesToolStripMenuItem.Name = "workPieceManufacturesToolStripMenuItem";
|
||||
workPieceManufacturesToolStripMenuItem.Size = new Size(310, 26);
|
||||
workPieceManufacturesToolStripMenuItem.Text = "Заготовки по изделиям";
|
||||
workPieceManufacturesToolStripMenuItem.Click += WorkPieceManufacturesToolStripMenuItem_Click;
|
||||
//
|
||||
// workWithImplementerToolStripMenuItem
|
||||
//
|
||||
workWithImplementerToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { implementerToolStripMenuItem });
|
||||
workWithImplementerToolStripMenuItem.Name = "workWithImplementerToolStripMenuItem";
|
||||
workWithImplementerToolStripMenuItem.Size = new Size(196, 24);
|
||||
workWithImplementerToolStripMenuItem.Text = "Работа с исполнителями";
|
||||
//
|
||||
// implementerToolStripMenuItem
|
||||
//
|
||||
implementerToolStripMenuItem.Name = "implementerToolStripMenuItem";
|
||||
implementerToolStripMenuItem.Size = new Size(185, 26);
|
||||
implementerToolStripMenuItem.Text = "Исполнители";
|
||||
implementerToolStripMenuItem.Click += ImplementerToolStripMenuItem_Click_1;
|
||||
//
|
||||
// работаСКлиентамиToolStripMenuItem
|
||||
//
|
||||
работаСКлиентамиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { clientsToolStripMenuItem });
|
||||
работаСКлиентамиToolStripMenuItem.Name = "работаСКлиентамиToolStripMenuItem";
|
||||
работаСКлиентамиToolStripMenuItem.Size = new Size(161, 24);
|
||||
работаСКлиентамиToolStripMenuItem.Text = "Работа с клиентами";
|
||||
//
|
||||
// clientsToolStripMenuItem
|
||||
//
|
||||
clientsToolStripMenuItem.Name = "clientsToolStripMenuItem";
|
||||
clientsToolStripMenuItem.Size = new Size(224, 26);
|
||||
clientsToolStripMenuItem.Text = "Клиенты";
|
||||
clientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click_1;
|
||||
//
|
||||
// startWorkToolStripMenuItem
|
||||
//
|
||||
startWorkToolStripMenuItem.Name = "startWorkToolStripMenuItem";
|
||||
startWorkToolStripMenuItem.Size = new Size(114, 24);
|
||||
startWorkToolStripMenuItem.Text = "Запуск работ";
|
||||
startWorkToolStripMenuItem.Click += StartWorkToolStripMenuItem_Click;
|
||||
//
|
||||
// buttonSellManufacture
|
||||
//
|
||||
buttonSellManufacture.Location = new Point(1014, 285);
|
||||
buttonSellManufacture.Name = "buttonSellManufacture";
|
||||
buttonSellManufacture.Size = new Size(233, 29);
|
||||
buttonSellManufacture.TabIndex = 7;
|
||||
buttonSellManufacture.Text = "Продажа изделий";
|
||||
buttonSellManufacture.UseVisualStyleBackColor = true;
|
||||
buttonSellManufacture.Click += ButtonSellManufacture_Click;
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1297, 496);
|
||||
Controls.Add(buttonSellManufacture);
|
||||
Controls.Add(buttonRef);
|
||||
Controls.Add(buttonIssuedOrder);
|
||||
Controls.Add(buttonCreateOrder);
|
||||
Controls.Add(dataGridView);
|
||||
Controls.Add(menuStrip);
|
||||
MainMenuStrip = menuStrip;
|
||||
Name = "FormMain";
|
||||
Text = "Кузнечная мастерская";
|
||||
Load += FormMain_Load;
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||
menuStrip.ResumeLayout(false);
|
||||
menuStrip.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
private DataGridView dataGridView;
|
||||
private Button buttonCreateOrder;
|
||||
private Button buttonIssuedOrder;
|
||||
private Button buttonRef;
|
||||
private MenuStrip menuStrip;
|
||||
private ToolStripMenuItem toolStripMenuItem;
|
||||
private ToolStripMenuItem workPieceToolStripMenuItem;
|
||||
private ToolStripMenuItem manufactureToolStripMenuItem;
|
||||
private ToolStripMenuItem shopToolStripMenuItem;
|
||||
private ToolStripMenuItem addManufactureToolStripMenuItem;
|
||||
private Button buttonSellManufacture;
|
||||
private ToolStripMenuItem reportToolStripMenuItem;
|
||||
private ToolStripMenuItem groupedOrdersReportToolStripMenuItem;
|
||||
private ToolStripMenuItem ordersReportToolStripMenuItem;
|
||||
private ToolStripMenuItem workloadStoresReportToolStripMenuItem;
|
||||
private ToolStripMenuItem shopsReportToolStripMenuItem;
|
||||
private ToolStripMenuItem reportManufactureToolStripMenuItem;
|
||||
private ToolStripMenuItem workPieceManufacturesToolStripMenuItem;
|
||||
}
|
||||
private DataGridView dataGridView;
|
||||
private Button buttonCreateOrder;
|
||||
private Button buttonIssuedOrder;
|
||||
private Button buttonRef;
|
||||
private MenuStrip menuStrip;
|
||||
private ToolStripMenuItem toolStripMenuItem;
|
||||
private ToolStripMenuItem workPieceToolStripMenuItem;
|
||||
private ToolStripMenuItem manufactureToolStripMenuItem;
|
||||
private ToolStripMenuItem shopToolStripMenuItem;
|
||||
private ToolStripMenuItem addManufactureToolStripMenuItem;
|
||||
private Button buttonSellManufacture;
|
||||
private ToolStripMenuItem reportToolStripMenuItem;
|
||||
private ToolStripMenuItem groupedOrdersReportToolStripMenuItem;
|
||||
private ToolStripMenuItem ordersReportToolStripMenuItem;
|
||||
private ToolStripMenuItem workloadStoresReportToolStripMenuItem;
|
||||
private ToolStripMenuItem shopsReportToolStripMenuItem;
|
||||
private ToolStripMenuItem reportManufactureToolStripMenuItem;
|
||||
private ToolStripMenuItem workPieceManufacturesToolStripMenuItem;
|
||||
private ToolStripMenuItem workWithImplementerToolStripMenuItem;
|
||||
private ToolStripMenuItem implementerToolStripMenuItem;
|
||||
private ToolStripMenuItem работаСКлиентамиToolStripMenuItem;
|
||||
private ToolStripMenuItem clientsToolStripMenuItem;
|
||||
private ToolStripMenuItem startWorkToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -15,111 +15,111 @@ using System.Windows.Forms;
|
||||
|
||||
namespace BlacksmithWorkshop
|
||||
{
|
||||
public partial class FormMain : Form
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
public partial class FormMain : Form
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly IOrderLogic _orderLogic;
|
||||
private readonly IOrderLogic _orderLogic;
|
||||
|
||||
private readonly IReportLogic _reportLogic;
|
||||
private readonly IReportLogic _reportLogic;
|
||||
|
||||
private readonly IWorkProcess _workProcess;
|
||||
private readonly IWorkProcess _workProcess;
|
||||
|
||||
public FormMain(ILogger<FormMain> logger, IOrderLogic orderLogic, IReportLogic reportLogic, IWorkProcess workProcess)
|
||||
{
|
||||
InitializeComponent();
|
||||
public FormMain(ILogger<FormMain> logger, IOrderLogic orderLogic, IReportLogic reportLogic, IWorkProcess workProcess)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_logger = logger;
|
||||
_orderLogic = orderLogic;
|
||||
_reportLogic = reportLogic;
|
||||
_workProcess = workProcess;
|
||||
}
|
||||
_logger = logger;
|
||||
_orderLogic = orderLogic;
|
||||
_reportLogic = reportLogic;
|
||||
_workProcess = workProcess;
|
||||
}
|
||||
|
||||
private void FormMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
private void FormMain_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void LoadData()
|
||||
{
|
||||
_logger.LogInformation("Загрузка заказов");
|
||||
private void LoadData()
|
||||
{
|
||||
_logger.LogInformation("Загрузка заказов");
|
||||
|
||||
try
|
||||
{
|
||||
var list = _orderLogic.ReadList(null);
|
||||
try
|
||||
{
|
||||
var list = _orderLogic.ReadList(null);
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["ManufactureId"].Visible = false;
|
||||
dataGridView.Columns["ImplementerId"].Visible = false;
|
||||
dataGridView.Columns["ClientId"].Visible = false;
|
||||
dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
if (list != null)
|
||||
{
|
||||
dataGridView.DataSource = list;
|
||||
dataGridView.Columns["ManufactureId"].Visible = false;
|
||||
dataGridView.Columns["ImplementerId"].Visible = false;
|
||||
dataGridView.Columns["ClientId"].Visible = false;
|
||||
dataGridView.Columns["ManufactureName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
|
||||
_logger.LogInformation("Загрузка заказов");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка загрузки заказов");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
_logger.LogInformation("Загрузка заказов");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка загрузки заказов");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void WorkPieceToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormWorkPieces));
|
||||
private void WorkPieceToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormWorkPieces));
|
||||
|
||||
if (service is FormWorkPieces form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
if (service is FormWorkPieces form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void ManufactureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormManufactures));
|
||||
private void ManufactureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormManufactures));
|
||||
|
||||
if (service is FormManufactures form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
if (service is FormManufactures form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormCreateOrder));
|
||||
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormCreateOrder));
|
||||
|
||||
if (service is FormCreateOrder form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
LoadData();
|
||||
}
|
||||
if (service is FormCreateOrder form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
LoadData();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonIssuedOrder_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView.SelectedRows.Count == 1)
|
||||
{
|
||||
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
_logger.LogInformation("Заказ №{id}. Меняется статус на 'Выдан'", id);
|
||||
private void ButtonIssuedOrder_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView.SelectedRows.Count == 1)
|
||||
{
|
||||
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
_logger.LogInformation("Заказ №{id}. Меняется статус на 'Выдан'", id);
|
||||
|
||||
try
|
||||
{
|
||||
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel
|
||||
{
|
||||
Id = id
|
||||
});
|
||||
try
|
||||
{
|
||||
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel
|
||||
{
|
||||
Id = id
|
||||
});
|
||||
|
||||
if (!operationResult)
|
||||
{
|
||||
throw new Exception("Ошибка при сохранении. Дополнительная информация в логах.");
|
||||
}
|
||||
if (!operationResult)
|
||||
{
|
||||
throw new Exception("Ошибка при сохранении. Дополнительная информация в логах.");
|
||||
}
|
||||
|
||||
_logger.LogInformation("Заказ №{id} выдан", id);
|
||||
_logger.LogInformation("Заказ №{id} выдан", id);
|
||||
|
||||
LoadData();
|
||||
}
|
||||
@ -131,123 +131,133 @@ namespace BlacksmithWorkshop
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonRef_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
private void ButtonRef_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void ButtonSellManufacture_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormSellManufacture));
|
||||
if (service is FormSellManufacture form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
private void ButtonSellManufacture_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormSellManufacture));
|
||||
if (service is FormSellManufacture form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
|
||||
private void ShopToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormShops));
|
||||
private void ShopToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormShops));
|
||||
|
||||
if (service is FormShops form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
if (service is FormShops form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void AddManufactureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormAddManufacture));
|
||||
private void AddManufactureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormAddManufacture));
|
||||
|
||||
if (service is FormAddManufacture form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
if (service is FormAddManufacture form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
|
||||
private void GroupedOrdersReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportGroupedOrders));
|
||||
private void GroupedOrdersReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportGroupedOrders));
|
||||
|
||||
if (service is FormReportGroupedOrders form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
if (service is FormReportGroupedOrders form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void OrdersReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders));
|
||||
private void WorkloadStoresReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportShopManufactures));
|
||||
|
||||
if (service is FormReportOrders form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
if (service is FormReportShopManufactures form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void WorkloadStoresReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportShopManufactures));
|
||||
private void ShopsReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||
|
||||
if (service is FormReportShopManufactures form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_reportLogic.SaveShopsToWordFile(new ReportBindingModel { FileName = dialog.FileName });
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void ShopsReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||
private void WorkPieceManufacturesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportManufactureWorkPieces));
|
||||
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_reportLogic.SaveShopsToWordFile(new ReportBindingModel { FileName = dialog.FileName });
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
if (service is FormReportManufactureWorkPieces form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void ReportManufactureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||
private void ImplementerToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormImplementers));
|
||||
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_reportLogic.SaveManufacturesToWordFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName
|
||||
});
|
||||
if (service is FormImplementers form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
private void ClientsToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormClients));
|
||||
|
||||
private void WorkPieceManufacturesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportManufactureWorkPieces));
|
||||
if (service is FormClients form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
if (service is FormReportManufactureWorkPieces form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
private void StartWorkToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
_workProcess.DoWork((Program.ServiceProvider?.GetService(typeof(IImplementerLogic)) as IImplementerLogic)!, _orderLogic);
|
||||
|
||||
private void StartingWorkToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
_workProcess.DoWork((Program.ServiceProvider?.GetService(typeof(IImplementerLogic)) as IImplementerLogic)!, _orderLogic);
|
||||
MessageBox.Show("Процесс обработки запущен", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
MessageBox.Show("Процесс обработки запущен", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
private void ReportManufactureToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||
|
||||
private void ImplementerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormImplementers));
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_reportLogic.SaveManufacturesToWordFile(new ReportBindingModel
|
||||
{
|
||||
FileName = dialog.FileName
|
||||
});
|
||||
|
||||
if (service is FormImplementers form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void OrdersReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders));
|
||||
|
||||
if (service is FormReportOrders form)
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -43,14 +43,20 @@ namespace BlacksmithWorkshop
|
||||
services.AddTransient<IOrderStorage, OrderStorage>();
|
||||
services.AddTransient<IManufactureStorage, ManufactureStorage>();
|
||||
services.AddTransient<IShopStorage, ShopStorage>();
|
||||
services.AddTransient<IImplementerStorage, ImplementerStorage>();
|
||||
services.AddTransient<IClientStorage, ClientStorage>();
|
||||
|
||||
services.AddTransient<IWorkPieceLogic, WorkPieceLogic>();
|
||||
services.AddTransient<IWorkPieceLogic, WorkPieceLogic>();
|
||||
services.AddTransient<IOrderLogic, OrderLogic>();
|
||||
services.AddTransient<IManufactureLogic, ManufactureLogic>();
|
||||
services.AddTransient<IShopLogic, ShopLogic>();
|
||||
services.AddTransient<IReportLogic, ReportLogic>();
|
||||
services.AddTransient<IImplementerLogic, ImplementerLogic>();
|
||||
services.AddTransient<IClientLogic, ClientLogic>();
|
||||
|
||||
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
||||
services.AddTransient<IWorkProcess, WorkModeling>();
|
||||
|
||||
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
||||
services.AddTransient<AbstractSaveToWord, SaveToWord>();
|
||||
services.AddTransient<AbstractSaveToPdf, SaveToPdf>();
|
||||
|
||||
@ -69,6 +75,9 @@ namespace BlacksmithWorkshop
|
||||
services.AddTransient<FormReportShopManufactures>();
|
||||
services.AddTransient<FormReportOrders>();
|
||||
services.AddTransient<FormReportGroupedOrders>();
|
||||
}
|
||||
services.AddTransient<FormClients>();
|
||||
services.AddTransient<FormImplementers>();
|
||||
services.AddTransient<FormImplementer>();
|
||||
}
|
||||
}
|
||||
}
|
@ -186,7 +186,7 @@ namespace BlacksmithWorkshopBusinessLogic.BusinessLogic
|
||||
}
|
||||
|
||||
//проверка на выдачу
|
||||
if (model.Status == OrderStatus.Готов)
|
||||
if (model.Status == OrderStatus.Выдан)
|
||||
{
|
||||
model.DateImplement = DateTime.Now;
|
||||
|
||||
|
@ -17,6 +17,8 @@ namespace BlacksmithWorkshopDataModels.Enums
|
||||
|
||||
Готов = 2,
|
||||
|
||||
Выдан = 3
|
||||
Выдан = 3,
|
||||
|
||||
Ожидание = 4
|
||||
}
|
||||
}
|
@ -0,0 +1,336 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using BlacksmithWorkshopDatabaseImplement;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BlacksmithWorkshopDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(BlacksmithWorkshopDatabase))]
|
||||
[Migration("20230421111331_ClearMigrationForLabWork06HArd")]
|
||||
partial class ClearMigrationForLabWork06HArd
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.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("BlacksmithWorkshopDatabaseImplement.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("BlacksmithWorkshopDatabaseImplement.Models.Manufacture", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ManufactureName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("Price")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Manufactures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.ManufactureWorkPiece", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ManufactureId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkPieceId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ManufactureId");
|
||||
|
||||
b.HasIndex("WorkPieceId");
|
||||
|
||||
b.ToTable("ManufactureWorkPieces");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
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>("ManufactureId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Sum")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("ImplementerId");
|
||||
|
||||
b.HasIndex("ManufactureId");
|
||||
|
||||
b.ToTable("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.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<DateTime>("DateOpen")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("MaxCountManufactures")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ShopName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Shops");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.ShopManufacture", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ManufactureId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ShopId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ManufactureId");
|
||||
|
||||
b.HasIndex("ShopId");
|
||||
|
||||
b.ToTable("ShopManufactures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.WorkPiece", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("WorkPieceName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("WorkPieces");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.ManufactureWorkPiece", b =>
|
||||
{
|
||||
b.HasOne("BlacksmithWorkshopDatabaseImplement.Models.Manufacture", "Manufacture")
|
||||
.WithMany("WorkPieces")
|
||||
.HasForeignKey("ManufactureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BlacksmithWorkshopDatabaseImplement.Models.WorkPiece", "WorkPiece")
|
||||
.WithMany("ManufactureWorkPieces")
|
||||
.HasForeignKey("WorkPieceId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Manufacture");
|
||||
|
||||
b.Navigation("WorkPiece");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.HasOne("BlacksmithWorkshopDatabaseImplement.Models.Client", "Client")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BlacksmithWorkshopDatabaseImplement.Models.Implementer", "Implementer")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("ImplementerId");
|
||||
|
||||
b.HasOne("BlacksmithWorkshopDatabaseImplement.Models.Manufacture", "Manufacture")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("ManufactureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Client");
|
||||
|
||||
b.Navigation("Implementer");
|
||||
|
||||
b.Navigation("Manufacture");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.ShopManufacture", b =>
|
||||
{
|
||||
b.HasOne("BlacksmithWorkshopDatabaseImplement.Models.Manufacture", "Manufacture")
|
||||
.WithMany("Shops")
|
||||
.HasForeignKey("ManufactureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BlacksmithWorkshopDatabaseImplement.Models.Shop", "Shop")
|
||||
.WithMany("Manufactures")
|
||||
.HasForeignKey("ShopId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Manufacture");
|
||||
|
||||
b.Navigation("Shop");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Client", b =>
|
||||
{
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Implementer", b =>
|
||||
{
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Manufacture", b =>
|
||||
{
|
||||
b.Navigation("Orders");
|
||||
|
||||
b.Navigation("Shops");
|
||||
|
||||
b.Navigation("WorkPieces");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.Shop", b =>
|
||||
{
|
||||
b.Navigation("Manufactures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlacksmithWorkshopDatabaseImplement.Models.WorkPiece", b =>
|
||||
{
|
||||
b.Navigation("ManufactureWorkPieces");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BlacksmithWorkshopDatabaseImplement.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ClearMigrationForLabWork06HArd : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql("DELETE FROM [dbo].[Orders]");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,8 @@ namespace BlacksmithWorkshopFileImplement
|
||||
|
||||
private readonly string ClientFileName = "Client.xml";
|
||||
|
||||
private readonly string ImplementerFileName = "Implementer.xml";
|
||||
|
||||
public List<WorkPiece> WorkPieces { get; private set; }
|
||||
|
||||
public List<Order> Orders { get; private set; }
|
||||
@ -32,6 +34,8 @@ namespace BlacksmithWorkshopFileImplement
|
||||
|
||||
public List<Client> Clients { get; private set; }
|
||||
|
||||
public List<Implementer> Implementers { get; private set; }
|
||||
|
||||
public static DataFileSingleton GetInstance()
|
||||
{
|
||||
if (instance == null)
|
||||
@ -52,6 +56,8 @@ namespace BlacksmithWorkshopFileImplement
|
||||
|
||||
public void SaveClients() => SaveData(Clients, ClientFileName, "Clients", x => x.GetXElement);
|
||||
|
||||
public void SaveImplementers() => SaveData(Implementers, ImplementerFileName, "Implementers", x => x.GetXElement);
|
||||
|
||||
private DataFileSingleton()
|
||||
{
|
||||
WorkPieces = LoadData(WorkPieceFileName, "WorkPiece", x => WorkPiece.Create(x)!)!;
|
||||
|
Loading…
Reference in New Issue
Block a user