without task

This commit is contained in:
VictoriaPresnyakova 2023-04-17 16:50:56 +04:00
parent fb400e9ab4
commit 44826328b7
6 changed files with 250 additions and 181 deletions

View File

@ -28,180 +28,189 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.buttonReady = new System.Windows.Forms.Button(); this.buttonReady = new System.Windows.Forms.Button();
this.dataGridView = new System.Windows.Forms.DataGridView(); this.dataGridView = new System.Windows.Forms.DataGridView();
this.buttonCreate = new System.Windows.Forms.Button(); this.buttonCreate = new System.Windows.Forms.Button();
this.buttonToWork = new System.Windows.Forms.Button(); this.buttonToWork = new System.Windows.Forms.Button();
this.buttonPut = new System.Windows.Forms.Button(); this.buttonPut = new System.Windows.Forms.Button();
this.buttonRefresh = new System.Windows.Forms.Button(); this.buttonRefresh = new System.Windows.Forms.Button();
this.menuStrip = new System.Windows.Forms.MenuStrip(); this.menuStrip = new System.Windows.Forms.MenuStrip();
this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.клиентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.списокКомпонентовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.отчетыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.компонентыПоИзделиямToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.списокКомпонентовToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.списокЗаказзов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();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.запускРаботToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.SuspendLayout(); this.menuStrip.SuspendLayout();
// this.SuspendLayout();
// buttonReady //
// // buttonReady
this.buttonReady.Location = new System.Drawing.Point(1273, 225); //
this.buttonReady.Name = "buttonReady"; this.buttonReady.Location = new System.Drawing.Point(1273, 225);
this.buttonReady.Size = new System.Drawing.Size(215, 34); this.buttonReady.Name = "buttonReady";
this.buttonReady.TabIndex = 3; this.buttonReady.Size = new System.Drawing.Size(215, 34);
this.buttonReady.Text = "Заказ готов"; this.buttonReady.TabIndex = 3;
this.buttonReady.UseVisualStyleBackColor = true; this.buttonReady.Text = "Заказ готов";
this.buttonReady.Click += new System.EventHandler(this.buttonReady_Click); this.buttonReady.UseVisualStyleBackColor = true;
// this.buttonReady.Click += new System.EventHandler(this.buttonReady_Click);
// dataGridView //
// // dataGridView
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; //
this.dataGridView.Location = new System.Drawing.Point(9, 52); this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Name = "dataGridView"; this.dataGridView.Location = new System.Drawing.Point(9, 52);
this.dataGridView.RowHeadersWidth = 62; this.dataGridView.Name = "dataGridView";
this.dataGridView.RowTemplate.Height = 33; this.dataGridView.RowHeadersWidth = 62;
this.dataGridView.Size = new System.Drawing.Size(1227, 386); this.dataGridView.RowTemplate.Height = 33;
this.dataGridView.TabIndex = 0; this.dataGridView.Size = new System.Drawing.Size(1227, 386);
// this.dataGridView.TabIndex = 0;
// buttonCreate //
// // buttonCreate
this.buttonCreate.Location = new System.Drawing.Point(1273, 52); //
this.buttonCreate.Name = "buttonCreate"; this.buttonCreate.Location = new System.Drawing.Point(1273, 52);
this.buttonCreate.Size = new System.Drawing.Size(215, 34); this.buttonCreate.Name = "buttonCreate";
this.buttonCreate.TabIndex = 1; this.buttonCreate.Size = new System.Drawing.Size(215, 34);
this.buttonCreate.Text = "Создать заказ"; this.buttonCreate.TabIndex = 1;
this.buttonCreate.UseVisualStyleBackColor = true; this.buttonCreate.Text = "Создать заказ";
this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click); this.buttonCreate.UseVisualStyleBackColor = true;
// this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click);
// buttonToWork //
// // buttonToWork
this.buttonToWork.Location = new System.Drawing.Point(1273, 137); //
this.buttonToWork.Name = "buttonToWork"; this.buttonToWork.Location = new System.Drawing.Point(1273, 137);
this.buttonToWork.Size = new System.Drawing.Size(215, 34); this.buttonToWork.Name = "buttonToWork";
this.buttonToWork.TabIndex = 2; this.buttonToWork.Size = new System.Drawing.Size(215, 34);
this.buttonToWork.Text = "Отдать на выполнение"; this.buttonToWork.TabIndex = 2;
this.buttonToWork.UseVisualStyleBackColor = true; this.buttonToWork.Text = "Отдать на выполнение";
this.buttonToWork.Click += new System.EventHandler(this.buttonToWork_Click); this.buttonToWork.UseVisualStyleBackColor = true;
// this.buttonToWork.Click += new System.EventHandler(this.buttonToWork_Click);
// buttonPut //
// // buttonPut
this.buttonPut.Location = new System.Drawing.Point(1273, 308); //
this.buttonPut.Name = "buttonPut"; this.buttonPut.Location = new System.Drawing.Point(1273, 308);
this.buttonPut.Size = new System.Drawing.Size(215, 34); this.buttonPut.Name = "buttonPut";
this.buttonPut.TabIndex = 4; this.buttonPut.Size = new System.Drawing.Size(215, 34);
this.buttonPut.Text = "Заказ выдан"; this.buttonPut.TabIndex = 4;
this.buttonPut.UseVisualStyleBackColor = true; this.buttonPut.Text = "Заказ выдан";
this.buttonPut.Click += new System.EventHandler(this.buttonPut_Click); this.buttonPut.UseVisualStyleBackColor = true;
// this.buttonPut.Click += new System.EventHandler(this.buttonPut_Click);
// buttonRefresh //
// // buttonRefresh
this.buttonRefresh.Location = new System.Drawing.Point(1273, 389); //
this.buttonRefresh.Name = "buttonRefresh"; this.buttonRefresh.Location = new System.Drawing.Point(1273, 389);
this.buttonRefresh.Size = new System.Drawing.Size(215, 34); this.buttonRefresh.Name = "buttonRefresh";
this.buttonRefresh.TabIndex = 5; this.buttonRefresh.Size = new System.Drawing.Size(215, 34);
this.buttonRefresh.Text = "Обновить список"; this.buttonRefresh.TabIndex = 5;
this.buttonRefresh.UseVisualStyleBackColor = true; this.buttonRefresh.Text = "Обновить список";
this.buttonRefresh.Click += new System.EventHandler(this.buttonRefresh_Click); this.buttonRefresh.UseVisualStyleBackColor = true;
// this.buttonRefresh.Click += new System.EventHandler(this.buttonRefresh_Click);
// menuStrip //
// // menuStrip
this.menuStrip.ImageScalingSize = new System.Drawing.Size(24, 24); //
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuStrip.ImageScalingSize = new System.Drawing.Size(24, 24);
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.справочникиToolStripMenuItem, this.справочникиToolStripMenuItem,
this.отчетыToolStripMenuItem}); this.отчетыToolStripMenuItem,
this.menuStrip.Location = new System.Drawing.Point(0, 0); this.запускРаботToolStripMenuItem});
this.menuStrip.Name = "menuStrip"; this.menuStrip.Location = new System.Drawing.Point(0, 0);
this.menuStrip.Size = new System.Drawing.Size(1530, 33); this.menuStrip.Name = "menuStrip";
this.menuStrip.TabIndex = 6; this.menuStrip.Size = new System.Drawing.Size(1530, 33);
this.menuStrip.Text = "menuStrip1"; this.menuStrip.TabIndex = 6;
// this.menuStrip.Text = "menuStrip1";
// справочникиToolStripMenuItem //
// // справочникиToolStripMenuItem
this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { //
this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.компонентыToolStripMenuItem, this.компонентыToolStripMenuItem,
this.изделияToolStripMenuItem, this.изделияToolStripMenuItem,
this.клиентыToolStripMenuItem}); this.клиентыToolStripMenuItem});
this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem"; this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(139, 29); this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(139, 29);
this.справочникиToolStripMenuItem.Text = "Справочники"; this.справочникиToolStripMenuItem.Text = "Справочники";
// //
// компонентыToolStripMenuItem // компонентыToolStripMenuItem
// //
this.компонентыToolStripMenuItem.Name = омпонентыToolStripMenuItem"; this.компонентыToolStripMenuItem.Name = омпонентыToolStripMenuItem";
this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(270, 34); this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(240, 34);
this.компонентыToolStripMenuItem.Text = "Компоненты"; this.компонентыToolStripMenuItem.Text = "Компоненты";
this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click); this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.компонентыToolStripMenuItem_Click);
// //
// изделияToolStripMenuItem // изделияToolStripMenuItem
// //
this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem"; this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem";
this.изделияToolStripMenuItem.Size = new System.Drawing.Size(270, 34); this.изделияToolStripMenuItem.Size = new System.Drawing.Size(240, 34);
this.изделияToolStripMenuItem.Text = "Драгоценности"; this.изделияToolStripMenuItem.Text = "Драгоценности";
this.изделияToolStripMenuItem.Click += new System.EventHandler(this.драгоценностиToolStripMenuItem_Click); this.изделияToolStripMenuItem.Click += new System.EventHandler(this.драгоценностиToolStripMenuItem_Click);
// //
// отчетыToolStripMenuItem // клиентыToolStripMenuItem
// //
this.отчетыToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem";
this.клиентыToolStripMenuItem.Size = new System.Drawing.Size(240, 34);
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, this.компонентыПоИзделиямToolStripMenuItem,
this.списокЗаказзовToolStripMenuItem}); this.списокЗаказзовToolStripMenuItem});
this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem"; this.отчетыToolStripMenuItem.Name = "отчетыToolStripMenuItem";
this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(88, 29); this.отчетыToolStripMenuItem.Size = new System.Drawing.Size(88, 29);
this.отчетыToolStripMenuItem.Text = "Отчеты"; this.отчетыToolStripMenuItem.Text = "Отчеты";
// //
// списокКомпонентовToolStripMenuItem // списокКомпонентовToolStripMenuItem
// //
this.списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem"; this.списокКомпонентовToolStripMenuItem.Name = "списокКомпонентовToolStripMenuItem";
this.списокКомпонентовToolStripMenuItem.Size = new System.Drawing.Size(325, 34); this.списокКомпонентовToolStripMenuItem.Size = new System.Drawing.Size(325, 34);
this.списокКомпонентовToolStripMenuItem.Text = "Список изделий"; this.списокКомпонентовToolStripMenuItem.Text = "Список изделий";
this.списокКомпонентовToolStripMenuItem.Click += new System.EventHandler(this.списокКомпонентовToolStripMenuItem_Click); this.списокКомпонентовToolStripMenuItem.Click += new System.EventHandler(this.списокКомпонентовToolStripMenuItem_Click);
// //
// компонентыПоИзделиямToolStripMenuItem // компонентыПоИзделиямToolStripMenuItem
// //
this.компонентыПоИзделиямToolStripMenuItem.Name = омпонентыПоИзделиямToolStripMenuItem"; this.компонентыПоИзделиямToolStripMenuItem.Name = омпонентыПоИзделиямToolStripMenuItem";
this.компонентыПоИзделиямToolStripMenuItem.Size = new System.Drawing.Size(325, 34); this.компонентыПоИзделиямToolStripMenuItem.Size = new System.Drawing.Size(325, 34);
this.компонентыПоИзделиямToolStripMenuItem.Text = "Изделия по компонентам"; this.компонентыПоИзделиямToolStripMenuItem.Text = "Изделия по компонентам";
this.компонентыПоИзделиямToolStripMenuItem.Click += new System.EventHandler(this.компонентыПоИзделиямToolStripMenuItem_Click); this.компонентыПоИзделиямToolStripMenuItem.Click += new System.EventHandler(this.компонентыПоИзделиямToolStripMenuItem_Click);
// //
// списокЗаказзовToolStripMenuItem // списокЗаказзовToolStripMenuItem
// //
this.списокЗаказзовToolStripMenuItem.Name = "списокЗаказзовToolStripMenuItem"; this.списокЗаказзовToolStripMenuItem.Name = "списокЗаказзовToolStripMenuItem";
this.списокЗаказзовToolStripMenuItem.Size = new System.Drawing.Size(325, 34); this.списокЗаказзовToolStripMenuItem.Size = new System.Drawing.Size(325, 34);
this.списокЗаказзовToolStripMenuItem.Text = "Список заказов"; this.списокЗаказзовToolStripMenuItem.Text = "Список заказов";
this.списокЗаказзовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказзовToolStripMenuItem_Click); this.списокЗаказзовToolStripMenuItem.Click += new System.EventHandler(this.списокЗаказзовToolStripMenuItem_Click);
// //
// клиентыToolStripMenuItem // запускРаботToolStripMenuItem
// //
this.клиентыToolStripMenuItem.Name = "клиентыToolStripMenuItem"; this.запускРаботToolStripMenuItem.Name = "запускРаботToolStripMenuItem";
this.клиентыToolStripMenuItem.Size = new System.Drawing.Size(270, 34); this.запускРаботToolStripMenuItem.Size = new System.Drawing.Size(136, 29);
this.клиентыToolStripMenuItem.Text = "Клиенты"; this.запускРаботToolStripMenuItem.Text = "Запуск работ";
this.клиентыToolStripMenuItem.Click += new System.EventHandler(this.клиентыToolStripMenuItem_Click); this.запускРаботToolStripMenuItem.Click += new System.EventHandler(this.запускРаботToolStripMenuItem_Click);
// //
// FormMain // FormMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1530, 450); this.ClientSize = new System.Drawing.Size(1530, 450);
this.Controls.Add(this.buttonRefresh); this.Controls.Add(this.buttonRefresh);
this.Controls.Add(this.buttonPut); this.Controls.Add(this.buttonPut);
this.Controls.Add(this.buttonReady); this.Controls.Add(this.buttonReady);
this.Controls.Add(this.buttonToWork); this.Controls.Add(this.buttonToWork);
this.Controls.Add(this.buttonCreate); this.Controls.Add(this.buttonCreate);
this.Controls.Add(this.dataGridView); this.Controls.Add(this.dataGridView);
this.Controls.Add(this.menuStrip); this.Controls.Add(this.menuStrip);
this.MainMenuStrip = this.menuStrip; this.MainMenuStrip = this.menuStrip;
this.Name = "FormMain"; this.Name = "FormMain";
this.Text = "Изготовление Драгоценностей"; this.Text = "Изготовление Драгоценностей";
this.Load += new System.EventHandler(this.FormMain_Load); this.Load += new System.EventHandler(this.FormMain_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.menuStrip.ResumeLayout(false); this.menuStrip.ResumeLayout(false);
this.menuStrip.PerformLayout(); this.menuStrip.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
@ -222,5 +231,6 @@
private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem; private ToolStripMenuItem компонентыПоИзделиямToolStripMenuItem;
private ToolStripMenuItem списокЗаказзовToolStripMenuItem; private ToolStripMenuItem списокЗаказзовToolStripMenuItem;
private ToolStripMenuItem клиентыToolStripMenuItem; private ToolStripMenuItem клиентыToolStripMenuItem;
} private ToolStripMenuItem запускРаботToolStripMenuItem;
}
} }

View File

@ -20,15 +20,16 @@ namespace JewelryStore
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IOrderLogic _orderLogic; private readonly IOrderLogic _orderLogic;
private readonly IReportLogic _reportLogic; private readonly IReportLogic _reportLogic;
private readonly IWorkProcess _workProcess;
public FormMain(ILogger<FormMain> logger, IOrderLogic orderLogic, IReportLogic reportLogic) public FormMain(ILogger<FormMain> logger, IOrderLogic orderLogic, IReportLogic reportLogic, IWorkProcess workProcess)
{ {
InitializeComponent(); InitializeComponent();
_logger = logger; _logger = logger;
_orderLogic = orderLogic; _orderLogic = orderLogic;
_reportLogic = reportLogic; _reportLogic = reportLogic;
_workProcess = workProcess;
} }
private void FormMain_Load(object sender, EventArgs e) private void FormMain_Load(object sender, EventArgs e)
@ -48,9 +49,9 @@ namespace JewelryStore
dataGridView.Columns["JewelId"].Visible = false; dataGridView.Columns["JewelId"].Visible = false;
dataGridView.Columns["ClientId"].Visible = false; dataGridView.Columns["ClientId"].Visible = false;
} }
_logger.LogInformation("Загрузка заказов"); _logger.LogInformation("Загрузка заказов");
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -231,13 +232,23 @@ namespace JewelryStore
} }
} }
private void клиентыToolStripMenuItem_Click(object sender, EventArgs e) private void клиентыToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var service = Program.ServiceProvider?.GetService(typeof(FormClients)); var service = Program.ServiceProvider?.GetService(typeof(FormClients));
if (service is FormClients form) if (service is FormClients form)
{ {
form.ShowDialog(); form.ShowDialog();
} }
} }
}
private void запускРаботToolStripMenuItem_Click(object sender, EventArgs e)
{
{
_workProcess.DoWork((Program.ServiceProvider?.GetService(typeof(IImplementerLogic)) as IImplementerLogic)!, _orderLogic);
MessageBox.Show("Процесс обработки запущен", "Сообщение",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
} }

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JewelryStoreBusinessLogic.BusinessLogics
{
internal class WorkModeling
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JewelryStoreContracts.BusinessLogicsContracts
{
internal interface IWorkProcess
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JewelryStoreDataModels.Models
{
internal interface IImplementerModel
{
}
}

View File

@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc;
namespace JewelryStoreRestApi.Controllers
{
public class ImplementerController : Controller
{
public IActionResult Index()
{
return View();
}
}
}