Реализованы формы для исполнителей
This commit is contained in:
parent
a64425108f
commit
476bd776ea
@ -30,6 +30,9 @@
|
|||||||
<Compile Update="FormViewClients.cs">
|
<Compile Update="FormViewClients.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="FormViewImplementers.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -27,8 +27,7 @@ namespace ConfectioneryView
|
|||||||
_logger.LogInformation("Получение компонента");
|
_logger.LogInformation("Получение компонента");
|
||||||
var view = _logic.ReadElement(new ComponentSearchModel
|
var view = _logic.ReadElement(new ComponentSearchModel
|
||||||
{
|
{
|
||||||
Id =
|
Id = _id.Value
|
||||||
_id.Value
|
|
||||||
});
|
});
|
||||||
if (view != null)
|
if (view != null)
|
||||||
{
|
{
|
||||||
|
173
Confectionery/FormImplementer.Designer.cs
generated
Normal file
173
Confectionery/FormImplementer.Designer.cs
generated
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
namespace ConfectioneryView
|
||||||
|
{
|
||||||
|
partial class FormImplementer
|
||||||
|
{
|
||||||
|
/// <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);
|
||||||
|
}
|
||||||
|
|
||||||
|
#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()
|
||||||
|
{
|
||||||
|
label1 = new Label();
|
||||||
|
label2 = new Label();
|
||||||
|
label3 = new Label();
|
||||||
|
label4 = new Label();
|
||||||
|
textBoxFio = new TextBox();
|
||||||
|
textBoxPassword = new TextBox();
|
||||||
|
numericUpDownWorkExperience = new NumericUpDown();
|
||||||
|
numericUpDownQualification = new NumericUpDown();
|
||||||
|
buttonCancel = new Button();
|
||||||
|
buttonSave = new Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDownWorkExperience).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDownQualification).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
label1.AutoSize = true;
|
||||||
|
label1.Location = new Point(79, 12);
|
||||||
|
label1.Name = "label1";
|
||||||
|
label1.Size = new Size(37, 15);
|
||||||
|
label1.TabIndex = 0;
|
||||||
|
label1.Text = "ФИО:";
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
label2.AutoSize = true;
|
||||||
|
label2.Location = new Point(69, 41);
|
||||||
|
label2.Name = "label2";
|
||||||
|
label2.Size = new Size(52, 15);
|
||||||
|
label2.TabIndex = 1;
|
||||||
|
label2.Text = "Пароль:";
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
label3.AutoSize = true;
|
||||||
|
label3.Location = new Point(78, 68);
|
||||||
|
label3.Name = "label3";
|
||||||
|
label3.Size = new Size(38, 15);
|
||||||
|
label3.TabIndex = 2;
|
||||||
|
label3.Text = "Стаж:";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
label4.AutoSize = true;
|
||||||
|
label4.Location = new Point(25, 97);
|
||||||
|
label4.Name = "label4";
|
||||||
|
label4.Size = new Size(91, 15);
|
||||||
|
label4.TabIndex = 3;
|
||||||
|
label4.Text = "Квалификация:";
|
||||||
|
//
|
||||||
|
// textBoxFio
|
||||||
|
//
|
||||||
|
textBoxFio.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
textBoxFio.Location = new Point(127, 9);
|
||||||
|
textBoxFio.Name = "textBoxFio";
|
||||||
|
textBoxFio.Size = new Size(271, 23);
|
||||||
|
textBoxFio.TabIndex = 4;
|
||||||
|
//
|
||||||
|
// textBoxPassword
|
||||||
|
//
|
||||||
|
textBoxPassword.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
textBoxPassword.Location = new Point(127, 38);
|
||||||
|
textBoxPassword.Name = "textBoxPassword";
|
||||||
|
textBoxPassword.PasswordChar = '*';
|
||||||
|
textBoxPassword.Size = new Size(271, 23);
|
||||||
|
textBoxPassword.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// numericUpDownWorkExperience
|
||||||
|
//
|
||||||
|
numericUpDownWorkExperience.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
numericUpDownWorkExperience.Location = new Point(127, 66);
|
||||||
|
numericUpDownWorkExperience.Name = "numericUpDownWorkExperience";
|
||||||
|
numericUpDownWorkExperience.Size = new Size(271, 23);
|
||||||
|
numericUpDownWorkExperience.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// numericUpDownQualification
|
||||||
|
//
|
||||||
|
numericUpDownQualification.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
numericUpDownQualification.Location = new Point(127, 95);
|
||||||
|
numericUpDownQualification.Name = "numericUpDownQualification";
|
||||||
|
numericUpDownQualification.Size = new Size(271, 23);
|
||||||
|
numericUpDownQualification.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
|
buttonCancel.Location = new Point(309, 138);
|
||||||
|
buttonCancel.Name = "buttonCancel";
|
||||||
|
buttonCancel.Size = new Size(89, 33);
|
||||||
|
buttonCancel.TabIndex = 8;
|
||||||
|
buttonCancel.Text = "Отмена";
|
||||||
|
buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
buttonCancel.Click += ButtonCancel_Click;
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
buttonSave.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||||
|
buttonSave.Location = new Point(214, 138);
|
||||||
|
buttonSave.Name = "buttonSave";
|
||||||
|
buttonSave.Size = new Size(89, 33);
|
||||||
|
buttonSave.TabIndex = 9;
|
||||||
|
buttonSave.Text = "Сохранить";
|
||||||
|
buttonSave.UseVisualStyleBackColor = true;
|
||||||
|
buttonSave.Click += ButtonSave_Click;
|
||||||
|
//
|
||||||
|
// FormImplementer
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(410, 183);
|
||||||
|
Controls.Add(buttonSave);
|
||||||
|
Controls.Add(buttonCancel);
|
||||||
|
Controls.Add(numericUpDownQualification);
|
||||||
|
Controls.Add(numericUpDownWorkExperience);
|
||||||
|
Controls.Add(textBoxPassword);
|
||||||
|
Controls.Add(textBoxFio);
|
||||||
|
Controls.Add(label4);
|
||||||
|
Controls.Add(label3);
|
||||||
|
Controls.Add(label2);
|
||||||
|
Controls.Add(label1);
|
||||||
|
Name = "FormImplementer";
|
||||||
|
Text = "Добавление / Редактирование исполнителя";
|
||||||
|
Load += FormImplementer_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDownWorkExperience).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDownQualification).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Label label1;
|
||||||
|
private Label label2;
|
||||||
|
private Label label3;
|
||||||
|
private Label label4;
|
||||||
|
private TextBox textBoxFio;
|
||||||
|
private TextBox textBoxPassword;
|
||||||
|
private NumericUpDown numericUpDownWorkExperience;
|
||||||
|
private NumericUpDown numericUpDownQualification;
|
||||||
|
private Button buttonCancel;
|
||||||
|
private Button buttonSave;
|
||||||
|
}
|
||||||
|
}
|
101
Confectionery/FormImplementer.cs
Normal file
101
Confectionery/FormImplementer.cs
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
using ConfectioneryContracts.BindingModels;
|
||||||
|
using ConfectioneryContracts.BusinessLogicsContracts;
|
||||||
|
using ConfectioneryContracts.SearchModels;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ConfectioneryView
|
||||||
|
{
|
||||||
|
public partial class FormImplementer : Form
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
private readonly IImplementerLogic _logic;
|
||||||
|
private int? _id;
|
||||||
|
public int Id { set { _id = value; } }
|
||||||
|
|
||||||
|
public FormImplementer(ILogger<FormImplementer> logger, IImplementerLogic logic)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_logger = logger;
|
||||||
|
_logic = logic;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FormImplementer_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (_id.HasValue)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_logger.LogInformation("Получение исполнителя");
|
||||||
|
var view = _logic.ReadElement(new ImplementerSearchModel
|
||||||
|
{
|
||||||
|
Id = _id.Value
|
||||||
|
});
|
||||||
|
if (view != null)
|
||||||
|
{
|
||||||
|
textBoxFio.Text = view.ImplementerFIO;
|
||||||
|
textBoxPassword.Text = view.Password;
|
||||||
|
numericUpDownQualification.Value = view.Qualification;
|
||||||
|
numericUpDownWorkExperience.Value = view.WorkExperience;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка получения исполнителя");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(textBoxPassword.Text))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Заполните пароль", "Ошибка",
|
||||||
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(textBoxFio.Text))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Заполните фио", "Ошибка",
|
||||||
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_logger.LogInformation("Сохранение исполнителя");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var model = new ImplementerBindingModel
|
||||||
|
{
|
||||||
|
Id = _id ?? 0,
|
||||||
|
ImplementerFIO = textBoxFio.Text,
|
||||||
|
Password = textBoxPassword.Text,
|
||||||
|
Qualification = (int)numericUpDownQualification.Value,
|
||||||
|
WorkExperience = (int)numericUpDownWorkExperience.Value,
|
||||||
|
};
|
||||||
|
var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model);
|
||||||
|
if (!operationResult)
|
||||||
|
{
|
||||||
|
throw new Exception("Ошибка при сохранении. Дополнительная информация в логах.");
|
||||||
|
}
|
||||||
|
MessageBox.Show("Сохранение прошло успешно", "Сообщение",
|
||||||
|
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка сохранения исполнителя");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ButtonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
60
Confectionery/FormImplementer.resx
Normal file
60
Confectionery/FormImplementer.resx
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<root>
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
435
Confectionery/FormMain.Designer.cs
generated
435
Confectionery/FormMain.Designer.cs
generated
@ -1,221 +1,230 @@
|
|||||||
namespace ConfectioneryView
|
namespace ConfectioneryView
|
||||||
{
|
{
|
||||||
partial class FormMain
|
partial class FormMain
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clean up any resources being used.
|
/// Clean up any resources being used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
{
|
{
|
||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
menuStrip1 = new MenuStrip();
|
menuStrip1 = new MenuStrip();
|
||||||
справочникиToolStripMenuItem = new ToolStripMenuItem();
|
справочникиToolStripMenuItem = new ToolStripMenuItem();
|
||||||
pastryToolStripMenuItem = new ToolStripMenuItem();
|
pastryToolStripMenuItem = new ToolStripMenuItem();
|
||||||
componentToolStripMenuItem = new ToolStripMenuItem();
|
componentToolStripMenuItem = new ToolStripMenuItem();
|
||||||
reportsToolStripMenuItem = new ToolStripMenuItem();
|
clientsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
pastriesToolStripMenuItem = new ToolStripMenuItem();
|
reportsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
pastryComponentsToolStripMenuItem = new ToolStripMenuItem();
|
pastriesToolStripMenuItem = new ToolStripMenuItem();
|
||||||
ordersToolStripMenuItem = new ToolStripMenuItem();
|
pastryComponentsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
dataGridView = new DataGridView();
|
ordersToolStripMenuItem = new ToolStripMenuItem();
|
||||||
buttonCreateOrder = new Button();
|
dataGridView = new DataGridView();
|
||||||
buttonTakeOrderInWork = new Button();
|
buttonCreateOrder = new Button();
|
||||||
button2 = new Button();
|
buttonTakeOrderInWork = new Button();
|
||||||
button3 = new Button();
|
button2 = new Button();
|
||||||
button4 = new Button();
|
button3 = new Button();
|
||||||
clientsToolStripMenuItem = new ToolStripMenuItem();
|
button4 = new Button();
|
||||||
menuStrip1.SuspendLayout();
|
ImplementersToolStripMenuItem = new ToolStripMenuItem();
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
menuStrip1.SuspendLayout();
|
||||||
SuspendLayout();
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
//
|
SuspendLayout();
|
||||||
// menuStrip1
|
//
|
||||||
//
|
// menuStrip1
|
||||||
menuStrip1.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, reportsToolStripMenuItem });
|
//
|
||||||
menuStrip1.Location = new Point(0, 0);
|
menuStrip1.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, reportsToolStripMenuItem });
|
||||||
menuStrip1.Name = "menuStrip1";
|
menuStrip1.Location = new Point(0, 0);
|
||||||
menuStrip1.Size = new Size(783, 24);
|
menuStrip1.Name = "menuStrip1";
|
||||||
menuStrip1.TabIndex = 0;
|
menuStrip1.Size = new Size(783, 24);
|
||||||
menuStrip1.Text = "menuStrip1";
|
menuStrip1.TabIndex = 0;
|
||||||
//
|
menuStrip1.Text = "menuStrip1";
|
||||||
// справочникиToolStripMenuItem
|
//
|
||||||
//
|
// справочникиToolStripMenuItem
|
||||||
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { pastryToolStripMenuItem, componentToolStripMenuItem, clientsToolStripMenuItem });
|
//
|
||||||
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { pastryToolStripMenuItem, componentToolStripMenuItem, clientsToolStripMenuItem, ImplementersToolStripMenuItem });
|
||||||
справочникиToolStripMenuItem.Size = new Size(94, 20);
|
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||||
справочникиToolStripMenuItem.Text = "Справочники";
|
справочникиToolStripMenuItem.Size = new Size(94, 20);
|
||||||
//
|
справочникиToolStripMenuItem.Text = "Справочники";
|
||||||
// pastryToolStripMenuItem
|
//
|
||||||
//
|
// pastryToolStripMenuItem
|
||||||
pastryToolStripMenuItem.Name = "pastryToolStripMenuItem";
|
//
|
||||||
pastryToolStripMenuItem.Size = new Size(180, 22);
|
pastryToolStripMenuItem.Name = "pastryToolStripMenuItem";
|
||||||
pastryToolStripMenuItem.Text = "Изделия";
|
pastryToolStripMenuItem.Size = new Size(180, 22);
|
||||||
pastryToolStripMenuItem.Click += PastryToolStripMenuItem_Click;
|
pastryToolStripMenuItem.Text = "Изделия";
|
||||||
//
|
pastryToolStripMenuItem.Click += PastryToolStripMenuItem_Click;
|
||||||
// componentToolStripMenuItem
|
//
|
||||||
//
|
// componentToolStripMenuItem
|
||||||
componentToolStripMenuItem.Name = "componentToolStripMenuItem";
|
//
|
||||||
componentToolStripMenuItem.Size = new Size(180, 22);
|
componentToolStripMenuItem.Name = "componentToolStripMenuItem";
|
||||||
componentToolStripMenuItem.Text = "Компоненты";
|
componentToolStripMenuItem.Size = new Size(180, 22);
|
||||||
componentToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click;
|
componentToolStripMenuItem.Text = "Компоненты";
|
||||||
//
|
componentToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click;
|
||||||
// reportsToolStripMenuItem
|
//
|
||||||
//
|
// clientsToolStripMenuItem
|
||||||
reportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { pastriesToolStripMenuItem, pastryComponentsToolStripMenuItem, ordersToolStripMenuItem });
|
//
|
||||||
reportsToolStripMenuItem.Name = "reportsToolStripMenuItem";
|
clientsToolStripMenuItem.Name = "clientsToolStripMenuItem";
|
||||||
reportsToolStripMenuItem.Size = new Size(60, 20);
|
clientsToolStripMenuItem.Size = new Size(180, 22);
|
||||||
reportsToolStripMenuItem.Text = "Отчеты";
|
clientsToolStripMenuItem.Text = "Клиенты";
|
||||||
//
|
clientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click;
|
||||||
// pastriesToolStripMenuItem
|
//
|
||||||
//
|
// reportsToolStripMenuItem
|
||||||
pastriesToolStripMenuItem.Name = "pastriesToolStripMenuItem";
|
//
|
||||||
pastriesToolStripMenuItem.Size = new Size(215, 22);
|
reportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { pastriesToolStripMenuItem, pastryComponentsToolStripMenuItem, ordersToolStripMenuItem });
|
||||||
pastriesToolStripMenuItem.Text = "Список изделий";
|
reportsToolStripMenuItem.Name = "reportsToolStripMenuItem";
|
||||||
pastriesToolStripMenuItem.Click += PastriesToolStripMenuItem_Click_1;
|
reportsToolStripMenuItem.Size = new Size(60, 20);
|
||||||
//
|
reportsToolStripMenuItem.Text = "Отчеты";
|
||||||
// pastryComponentsToolStripMenuItem
|
//
|
||||||
//
|
// pastriesToolStripMenuItem
|
||||||
pastryComponentsToolStripMenuItem.Name = "pastryComponentsToolStripMenuItem";
|
//
|
||||||
pastryComponentsToolStripMenuItem.Size = new Size(215, 22);
|
pastriesToolStripMenuItem.Name = "pastriesToolStripMenuItem";
|
||||||
pastryComponentsToolStripMenuItem.Text = "Изделия с компонентами";
|
pastriesToolStripMenuItem.Size = new Size(215, 22);
|
||||||
pastryComponentsToolStripMenuItem.Click += PastryComponentsToolStripMenuItem_Click;
|
pastriesToolStripMenuItem.Text = "Список изделий";
|
||||||
//
|
pastriesToolStripMenuItem.Click += PastriesToolStripMenuItem_Click_1;
|
||||||
// ordersToolStripMenuItem
|
//
|
||||||
//
|
// pastryComponentsToolStripMenuItem
|
||||||
ordersToolStripMenuItem.Name = "ordersToolStripMenuItem";
|
//
|
||||||
ordersToolStripMenuItem.Size = new Size(215, 22);
|
pastryComponentsToolStripMenuItem.Name = "pastryComponentsToolStripMenuItem";
|
||||||
ordersToolStripMenuItem.Text = "Список заказов";
|
pastryComponentsToolStripMenuItem.Size = new Size(215, 22);
|
||||||
ordersToolStripMenuItem.Click += OrdersToolStripMenuItem_Click;
|
pastryComponentsToolStripMenuItem.Text = "Изделия с компонентами";
|
||||||
//
|
pastryComponentsToolStripMenuItem.Click += PastryComponentsToolStripMenuItem_Click;
|
||||||
// dataGridView
|
//
|
||||||
//
|
// ordersToolStripMenuItem
|
||||||
dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
//
|
||||||
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
ordersToolStripMenuItem.Name = "ordersToolStripMenuItem";
|
||||||
dataGridView.Location = new Point(12, 27);
|
ordersToolStripMenuItem.Size = new Size(215, 22);
|
||||||
dataGridView.Name = "dataGridView";
|
ordersToolStripMenuItem.Text = "Список заказов";
|
||||||
dataGridView.RowTemplate.Height = 25;
|
ordersToolStripMenuItem.Click += OrdersToolStripMenuItem_Click;
|
||||||
dataGridView.Size = new Size(606, 341);
|
//
|
||||||
dataGridView.TabIndex = 1;
|
// dataGridView
|
||||||
//
|
//
|
||||||
// buttonCreateOrder
|
dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
//
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
buttonCreateOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
dataGridView.Location = new Point(12, 27);
|
||||||
buttonCreateOrder.Location = new Point(624, 39);
|
dataGridView.Name = "dataGridView";
|
||||||
buttonCreateOrder.Name = "buttonCreateOrder";
|
dataGridView.RowTemplate.Height = 25;
|
||||||
buttonCreateOrder.Size = new Size(147, 32);
|
dataGridView.Size = new Size(606, 341);
|
||||||
buttonCreateOrder.TabIndex = 2;
|
dataGridView.TabIndex = 1;
|
||||||
buttonCreateOrder.Text = "Создать заказ";
|
//
|
||||||
buttonCreateOrder.UseVisualStyleBackColor = true;
|
// buttonCreateOrder
|
||||||
buttonCreateOrder.Click += ButtonCreateOrder_Click;
|
//
|
||||||
//
|
buttonCreateOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
// buttonTakeOrderInWork
|
buttonCreateOrder.Location = new Point(624, 39);
|
||||||
//
|
buttonCreateOrder.Name = "buttonCreateOrder";
|
||||||
buttonTakeOrderInWork.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
buttonCreateOrder.Size = new Size(147, 32);
|
||||||
buttonTakeOrderInWork.Location = new Point(624, 98);
|
buttonCreateOrder.TabIndex = 2;
|
||||||
buttonTakeOrderInWork.Name = "buttonTakeOrderInWork";
|
buttonCreateOrder.Text = "Создать заказ";
|
||||||
buttonTakeOrderInWork.Size = new Size(147, 32);
|
buttonCreateOrder.UseVisualStyleBackColor = true;
|
||||||
buttonTakeOrderInWork.TabIndex = 3;
|
buttonCreateOrder.Click += ButtonCreateOrder_Click;
|
||||||
buttonTakeOrderInWork.Text = "Отдать на выполнение";
|
//
|
||||||
buttonTakeOrderInWork.UseVisualStyleBackColor = true;
|
// buttonTakeOrderInWork
|
||||||
buttonTakeOrderInWork.Click += ButtonTakeOrderInWork_Click;
|
//
|
||||||
//
|
buttonTakeOrderInWork.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
// button2
|
buttonTakeOrderInWork.Location = new Point(624, 98);
|
||||||
//
|
buttonTakeOrderInWork.Name = "buttonTakeOrderInWork";
|
||||||
button2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
buttonTakeOrderInWork.Size = new Size(147, 32);
|
||||||
button2.Location = new Point(624, 157);
|
buttonTakeOrderInWork.TabIndex = 3;
|
||||||
button2.Name = "button2";
|
buttonTakeOrderInWork.Text = "Отдать на выполнение";
|
||||||
button2.Size = new Size(147, 32);
|
buttonTakeOrderInWork.UseVisualStyleBackColor = true;
|
||||||
button2.TabIndex = 4;
|
buttonTakeOrderInWork.Click += ButtonTakeOrderInWork_Click;
|
||||||
button2.Text = "Заказ готов";
|
//
|
||||||
button2.UseVisualStyleBackColor = true;
|
// button2
|
||||||
button2.Click += ButtonOrderReady_Click;
|
//
|
||||||
//
|
button2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
// button3
|
button2.Location = new Point(624, 157);
|
||||||
//
|
button2.Name = "button2";
|
||||||
button3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
button2.Size = new Size(147, 32);
|
||||||
button3.Location = new Point(624, 215);
|
button2.TabIndex = 4;
|
||||||
button3.Name = "button3";
|
button2.Text = "Заказ готов";
|
||||||
button3.Size = new Size(147, 32);
|
button2.UseVisualStyleBackColor = true;
|
||||||
button3.TabIndex = 5;
|
button2.Click += ButtonOrderReady_Click;
|
||||||
button3.Text = "Заказ выдан";
|
//
|
||||||
button3.UseVisualStyleBackColor = true;
|
// button3
|
||||||
button3.Click += ButtonIssuedOrder_Click;
|
//
|
||||||
//
|
button3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
// button4
|
button3.Location = new Point(624, 215);
|
||||||
//
|
button3.Name = "button3";
|
||||||
button4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
button3.Size = new Size(147, 32);
|
||||||
button4.Location = new Point(624, 274);
|
button3.TabIndex = 5;
|
||||||
button4.Name = "button4";
|
button3.Text = "Заказ выдан";
|
||||||
button4.Size = new Size(147, 32);
|
button3.UseVisualStyleBackColor = true;
|
||||||
button4.TabIndex = 6;
|
button3.Click += ButtonIssuedOrder_Click;
|
||||||
button4.Text = "Обновить список";
|
//
|
||||||
button4.UseVisualStyleBackColor = true;
|
// button4
|
||||||
button4.Click += ButtonRef_Click;
|
//
|
||||||
//
|
button4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
// clientsToolStripMenuItem
|
button4.Location = new Point(624, 274);
|
||||||
//
|
button4.Name = "button4";
|
||||||
clientsToolStripMenuItem.Name = "clientsToolStripMenuItem";
|
button4.Size = new Size(147, 32);
|
||||||
clientsToolStripMenuItem.Size = new Size(180, 22);
|
button4.TabIndex = 6;
|
||||||
clientsToolStripMenuItem.Text = "Клиенты";
|
button4.Text = "Обновить список";
|
||||||
clientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click;
|
button4.UseVisualStyleBackColor = true;
|
||||||
//
|
button4.Click += ButtonRef_Click;
|
||||||
// FormMain
|
//
|
||||||
//
|
// ImplementersToolStripMenuItem
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
//
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
ImplementersToolStripMenuItem.Name = "ImplementersToolStripMenuItem";
|
||||||
ClientSize = new Size(783, 380);
|
ImplementersToolStripMenuItem.Size = new Size(180, 22);
|
||||||
Controls.Add(button4);
|
ImplementersToolStripMenuItem.Text = "Исполнители";
|
||||||
Controls.Add(button3);
|
ImplementersToolStripMenuItem.Click += ImplementersToolStripMenuItem_Click;
|
||||||
Controls.Add(button2);
|
//
|
||||||
Controls.Add(buttonTakeOrderInWork);
|
// FormMain
|
||||||
Controls.Add(buttonCreateOrder);
|
//
|
||||||
Controls.Add(dataGridView);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
Controls.Add(menuStrip1);
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
MainMenuStrip = menuStrip1;
|
ClientSize = new Size(783, 380);
|
||||||
Name = "FormMain";
|
Controls.Add(button4);
|
||||||
Text = "Кондитерская";
|
Controls.Add(button3);
|
||||||
Load += FormMain_Load;
|
Controls.Add(button2);
|
||||||
menuStrip1.ResumeLayout(false);
|
Controls.Add(buttonTakeOrderInWork);
|
||||||
menuStrip1.PerformLayout();
|
Controls.Add(buttonCreateOrder);
|
||||||
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
Controls.Add(dataGridView);
|
||||||
ResumeLayout(false);
|
Controls.Add(menuStrip1);
|
||||||
PerformLayout();
|
MainMenuStrip = menuStrip1;
|
||||||
}
|
Name = "FormMain";
|
||||||
|
Text = "Кондитерская";
|
||||||
|
Load += FormMain_Load;
|
||||||
|
menuStrip1.ResumeLayout(false);
|
||||||
|
menuStrip1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private MenuStrip menuStrip1;
|
private MenuStrip menuStrip1;
|
||||||
private ToolStripMenuItem справочникиToolStripMenuItem;
|
private ToolStripMenuItem справочникиToolStripMenuItem;
|
||||||
private DataGridView dataGridView;
|
private DataGridView dataGridView;
|
||||||
private Button buttonCreateOrder;
|
private Button buttonCreateOrder;
|
||||||
private Button buttonTakeOrderInWork;
|
private Button buttonTakeOrderInWork;
|
||||||
private Button button2;
|
private Button button2;
|
||||||
private Button button3;
|
private Button button3;
|
||||||
private Button button4;
|
private Button button4;
|
||||||
private ToolStripMenuItem pastryToolStripMenuItem;
|
private ToolStripMenuItem pastryToolStripMenuItem;
|
||||||
private ToolStripMenuItem componentToolStripMenuItem;
|
private ToolStripMenuItem componentToolStripMenuItem;
|
||||||
private ToolStripMenuItem reportsToolStripMenuItem;
|
private ToolStripMenuItem reportsToolStripMenuItem;
|
||||||
private ToolStripMenuItem pastriesToolStripMenuItem;
|
private ToolStripMenuItem pastriesToolStripMenuItem;
|
||||||
private ToolStripMenuItem pastryComponentsToolStripMenuItem;
|
private ToolStripMenuItem pastryComponentsToolStripMenuItem;
|
||||||
private ToolStripMenuItem ordersToolStripMenuItem;
|
private ToolStripMenuItem ordersToolStripMenuItem;
|
||||||
private ToolStripMenuItem clientsToolStripMenuItem;
|
private ToolStripMenuItem clientsToolStripMenuItem;
|
||||||
}
|
private ToolStripMenuItem ImplementersToolStripMenuItem;
|
||||||
|
}
|
||||||
}
|
}
|
@ -7,192 +7,202 @@ using System.Windows.Forms;
|
|||||||
|
|
||||||
namespace ConfectioneryView
|
namespace ConfectioneryView
|
||||||
{
|
{
|
||||||
public partial class FormMain : Form
|
public partial class FormMain : Form
|
||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IOrderLogic _orderLogic;
|
private readonly IOrderLogic _orderLogic;
|
||||||
private readonly IReportLogic _reportLogic;
|
private readonly IReportLogic _reportLogic;
|
||||||
|
|
||||||
public FormMain(ILogger<FormMain> logger, IOrderLogic orderLogic, IReportLogic reportLogic)
|
public FormMain(ILogger<FormMain> logger, IOrderLogic orderLogic, IReportLogic reportLogic)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_orderLogic = orderLogic;
|
_orderLogic = orderLogic;
|
||||||
_reportLogic = reportLogic;
|
_reportLogic = reportLogic;
|
||||||
}
|
}
|
||||||
private void FormMain_Load(object sender, EventArgs e)
|
private void FormMain_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
private void LoadData()
|
private void LoadData()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var list = _orderLogic.ReadList(null);
|
var list = _orderLogic.ReadList(null);
|
||||||
if (list != null)
|
if (list != null)
|
||||||
{
|
{
|
||||||
dataGridView.DataSource = list;
|
dataGridView.DataSource = list;
|
||||||
dataGridView.Columns["Id"].HeaderText = "Íîìåð çàêàçà";
|
dataGridView.Columns["Id"].HeaderText = "Íîìåð çàêàçà";
|
||||||
dataGridView.Columns["PastryId"].Visible = false;
|
dataGridView.Columns["PastryId"].Visible = false;
|
||||||
dataGridView.Columns["ClientId"].Visible = false;
|
dataGridView.Columns["ClientId"].Visible = false;
|
||||||
dataGridView.Columns["PastryName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
dataGridView.Columns["ImplementerId"].Visible = false;
|
||||||
dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
dataGridView.Columns["PastryName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
}
|
dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
_logger.LogInformation("Çàãðóçêà çàêàçîâ");
|
}
|
||||||
}
|
_logger.LogInformation("Çàãðóçêà çàêàçîâ");
|
||||||
catch (Exception ex)
|
}
|
||||||
{
|
catch (Exception ex)
|
||||||
_logger.LogError(ex, "Îøèáêà çàãðóçêè çàêàçîâ");
|
{
|
||||||
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK,
|
_logger.LogError(ex, "Îøèáêà çàãðóçêè çàêàçîâ");
|
||||||
MessageBoxIcon.Error);
|
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK,
|
||||||
}
|
MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
private void ComponentsToolStripMenuItem_Click(object sender, EventArgs
|
}
|
||||||
e)
|
private void ComponentsToolStripMenuItem_Click(object sender, EventArgs
|
||||||
{
|
e)
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormComponents));
|
{
|
||||||
if (service is FormComponents form)
|
var service = Program.ServiceProvider?.GetService(typeof(FormComponents));
|
||||||
{
|
if (service is FormComponents form)
|
||||||
form.ShowDialog();
|
{
|
||||||
}
|
form.ShowDialog();
|
||||||
}
|
}
|
||||||
private void PastryToolStripMenuItem_Click(object sender, EventArgs e)
|
}
|
||||||
{
|
private void PastryToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormViewPastry));
|
{
|
||||||
if (service is FormViewPastry form)
|
var service = Program.ServiceProvider?.GetService(typeof(FormViewPastry));
|
||||||
{
|
if (service is FormViewPastry form)
|
||||||
form.ShowDialog();
|
{
|
||||||
}
|
form.ShowDialog();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
private void ButtonCreateOrder_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var service =
|
var service =
|
||||||
Program.ServiceProvider?.GetService(typeof(FormCreateOrder));
|
Program.ServiceProvider?.GetService(typeof(FormCreateOrder));
|
||||||
if (service is FormCreateOrder form)
|
if (service is FormCreateOrder form)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonTakeOrderInWork_Click(object sender, EventArgs e)
|
private void ButtonTakeOrderInWork_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count == 1)
|
if (dataGridView.SelectedRows.Count == 1)
|
||||||
{
|
{
|
||||||
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||||
_logger.LogInformation("Çàêàç No{id}. Ìåíÿåòñÿ ñòàòóñ íà 'Â ðàáîòå'", id);
|
_logger.LogInformation("Çàêàç No{id}. Ìåíÿåòñÿ ñòàòóñ íà 'Â ðàáîòå'", id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel { Id = id });
|
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel { Id = id });
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
throw new Exception("Îøèáêà ïðè ñîõðàíåíèè. Äîïîëíèòåëüíàÿ èíôîðìàöèÿ â ëîãàõ.");
|
throw new Exception("Îøèáêà ïðè ñîõðàíåíèè. Äîïîëíèòåëüíàÿ èíôîðìàöèÿ â ëîãàõ.");
|
||||||
}
|
}
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Îøèáêà ïåðåäà÷è çàêàçà â ðàáîòó");
|
_logger.LogError(ex, "Îøèáêà ïåðåäà÷è çàêàçà â ðàáîòó");
|
||||||
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK,
|
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK,
|
||||||
MessageBoxIcon.Error);
|
MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void ButtonOrderReady_Click(object sender, EventArgs e)
|
private void ButtonOrderReady_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count == 1)
|
if (dataGridView.SelectedRows.Count == 1)
|
||||||
{
|
{
|
||||||
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||||
OrderStatus orderStatus = (OrderStatus)dataGridView.SelectedRows[0].Cells["Status"].Value;
|
OrderStatus orderStatus = (OrderStatus)dataGridView.SelectedRows[0].Cells["Status"].Value;
|
||||||
_logger.LogInformation("Çàêàç No{id}. Ìåíÿåòñÿ ñòàòóñ íà 'Ãîòîâ'", id);
|
_logger.LogInformation("Çàêàç No{id}. Ìåíÿåòñÿ ñòàòóñ íà 'Ãîòîâ'", id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel
|
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id,
|
||||||
Status = orderStatus
|
Status = orderStatus
|
||||||
});
|
});
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
throw new Exception("Îøèáêà ïðè ñîõðàíåíèè. Äîïîëíèòåëüíàÿ èíôîðìàöèÿ â ëîãàõ.");
|
throw new Exception("Îøèáêà ïðè ñîõðàíåíèè. Äîïîëíèòåëüíàÿ èíôîðìàöèÿ â ëîãàõ.");
|
||||||
}
|
}
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Îøèáêà îòìåòêè î ãîòîâíîñòè çàêàçà");
|
_logger.LogError(ex, "Îøèáêà îòìåòêè î ãîòîâíîñòè çàêàçà");
|
||||||
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void ButtonIssuedOrder_Click(object sender, EventArgs e)
|
private void ButtonIssuedOrder_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (dataGridView.SelectedRows.Count == 1)
|
if (dataGridView.SelectedRows.Count == 1)
|
||||||
{
|
{
|
||||||
int id =
|
int id =
|
||||||
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||||
_logger.LogInformation("Çàêàç No{id}. Ìåíÿåòñÿ ñòàòóñ íà 'Âûäàí'", id);
|
_logger.LogInformation("Çàêàç No{id}. Ìåíÿåòñÿ ñòàòóñ íà 'Âûäàí'", id);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var operationResult = _orderLogic.DeliveryOrder(new
|
var operationResult = _orderLogic.DeliveryOrder(new
|
||||||
OrderBindingModel
|
OrderBindingModel
|
||||||
{ Id = id });
|
{ Id = id });
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
throw new Exception("Îøèáêà ïðè ñîõðàíåíèè.Äîïîëíèòåëüíàÿ èíôîðìàöèÿ â ëîãàõ.");
|
throw new Exception("Îøèáêà ïðè ñîõðàíåíèè.Äîïîëíèòåëüíàÿ èíôîðìàöèÿ â ëîãàõ.");
|
||||||
}
|
}
|
||||||
_logger.LogInformation("Çàêàç No{id} âûäàí", id);
|
_logger.LogInformation("Çàêàç No{id} âûäàí", id);
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Îøèáêà îòìåòêè î âûäà÷è çàêàçà");
|
_logger.LogError(ex, "Îøèáêà îòìåòêè î âûäà÷è çàêàçà");
|
||||||
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK,
|
MessageBox.Show(ex.Message, "Îøèáêà", MessageBoxButtons.OK,
|
||||||
MessageBoxIcon.Error);
|
MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void ButtonRef_Click(object sender, EventArgs e)
|
private void ButtonRef_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PastriesToolStripMenuItem_Click_1(object sender, EventArgs e)
|
private void PastriesToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
using var dialog = new SaveFileDialog { Filter = "docx|*.docx" };
|
||||||
if (dialog.ShowDialog() == DialogResult.OK)
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
_reportLogic.SavePastriesToWordFile(new ReportBindingModel { FileName = dialog.FileName });
|
_reportLogic.SavePastriesToWordFile(new ReportBindingModel { FileName = dialog.FileName });
|
||||||
MessageBox.Show("Âûïîëíåíî", "Óñïåõ", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("Âûïîëíåíî", "Óñïåõ", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PastryComponentsToolStripMenuItem_Click(object sender, EventArgs e)
|
private void PastryComponentsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportPastryComponents));
|
var service = Program.ServiceProvider?.GetService(typeof(FormReportPastryComponents));
|
||||||
if (service is FormReportPastryComponents form)
|
if (service is FormReportPastryComponents form)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OrdersToolStripMenuItem_Click(object sender, EventArgs e)
|
private void OrdersToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders));
|
var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders));
|
||||||
if (service is FormReportOrders form)
|
if (service is FormReportOrders form)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClientsToolStripMenuItem_Click(object sender, EventArgs e)
|
private void ClientsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var service = Program.ServiceProvider?.GetService(typeof(FormViewClients));
|
var service = Program.ServiceProvider?.GetService(typeof(FormViewClients));
|
||||||
if (service is FormViewClients form)
|
if (service is FormViewClients form)
|
||||||
{
|
{
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private void ImplementersToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormViewImplementers));
|
||||||
|
if (service is FormViewImplementers form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
118
Confectionery/FormViewImplementers.Designer.cs
generated
Normal file
118
Confectionery/FormViewImplementers.Designer.cs
generated
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
namespace ConfectioneryView
|
||||||
|
{
|
||||||
|
partial class FormViewImplementers
|
||||||
|
{
|
||||||
|
/// <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);
|
||||||
|
}
|
||||||
|
|
||||||
|
#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()
|
||||||
|
{
|
||||||
|
buttonRef = new Button();
|
||||||
|
buttonDel = new Button();
|
||||||
|
buttonUpd = new Button();
|
||||||
|
buttonAdd = new Button();
|
||||||
|
dataGridView = new DataGridView();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// buttonRef
|
||||||
|
//
|
||||||
|
buttonRef.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
buttonRef.Location = new Point(626, 202);
|
||||||
|
buttonRef.Name = "buttonRef";
|
||||||
|
buttonRef.Size = new Size(90, 37);
|
||||||
|
buttonRef.TabIndex = 9;
|
||||||
|
buttonRef.Text = "Обновить";
|
||||||
|
buttonRef.UseVisualStyleBackColor = true;
|
||||||
|
buttonRef.Click += ButtonRef_Click;
|
||||||
|
//
|
||||||
|
// buttonDel
|
||||||
|
//
|
||||||
|
buttonDel.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
buttonDel.Location = new Point(626, 151);
|
||||||
|
buttonDel.Name = "buttonDel";
|
||||||
|
buttonDel.Size = new Size(90, 33);
|
||||||
|
buttonDel.TabIndex = 8;
|
||||||
|
buttonDel.Text = "Удалить";
|
||||||
|
buttonDel.UseVisualStyleBackColor = true;
|
||||||
|
buttonDel.Click += ButtonDel_Click;
|
||||||
|
//
|
||||||
|
// buttonUpd
|
||||||
|
//
|
||||||
|
buttonUpd.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
buttonUpd.Location = new Point(626, 102);
|
||||||
|
buttonUpd.Name = "buttonUpd";
|
||||||
|
buttonUpd.Size = new Size(90, 34);
|
||||||
|
buttonUpd.TabIndex = 7;
|
||||||
|
buttonUpd.Text = "Изменить";
|
||||||
|
buttonUpd.UseVisualStyleBackColor = true;
|
||||||
|
buttonUpd.Click += ButtonUpd_Click;
|
||||||
|
//
|
||||||
|
// buttonAdd
|
||||||
|
//
|
||||||
|
buttonAdd.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||||
|
buttonAdd.Location = new Point(626, 57);
|
||||||
|
buttonAdd.Name = "buttonAdd";
|
||||||
|
buttonAdd.Size = new Size(90, 30);
|
||||||
|
buttonAdd.TabIndex = 6;
|
||||||
|
buttonAdd.Text = "Добавить";
|
||||||
|
buttonAdd.UseVisualStyleBackColor = true;
|
||||||
|
buttonAdd.Click += ButtonAdd_Click;
|
||||||
|
//
|
||||||
|
// dataGridView
|
||||||
|
//
|
||||||
|
dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||||
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
dataGridView.Location = new Point(12, 12);
|
||||||
|
dataGridView.Name = "dataGridView";
|
||||||
|
dataGridView.RowTemplate.Height = 25;
|
||||||
|
dataGridView.Size = new Size(553, 302);
|
||||||
|
dataGridView.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// FormViewImplementers
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(722, 319);
|
||||||
|
Controls.Add(buttonRef);
|
||||||
|
Controls.Add(buttonDel);
|
||||||
|
Controls.Add(buttonUpd);
|
||||||
|
Controls.Add(buttonAdd);
|
||||||
|
Controls.Add(dataGridView);
|
||||||
|
Name = "FormViewImplementers";
|
||||||
|
Text = "Просмотр списка исполнителей";
|
||||||
|
Load += FormViewImplementers_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Button buttonRef;
|
||||||
|
private Button buttonDel;
|
||||||
|
private Button buttonUpd;
|
||||||
|
private Button buttonAdd;
|
||||||
|
private DataGridView dataGridView;
|
||||||
|
}
|
||||||
|
}
|
111
Confectionery/FormViewImplementers.cs
Normal file
111
Confectionery/FormViewImplementers.cs
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
using ConfectioneryContracts.BindingModels;
|
||||||
|
using ConfectioneryContracts.BusinessLogicsContracts;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ConfectioneryView
|
||||||
|
{
|
||||||
|
public partial class FormViewImplementers : Form
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
private readonly IImplementerLogic _logic;
|
||||||
|
public FormViewImplementers(ILogger<FormViewImplementers> logger, IImplementerLogic logic)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_logger = logger;
|
||||||
|
_logic = logic;
|
||||||
|
}
|
||||||
|
private void FormViewImplementers_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
private void LoadData()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var list = _logic.ReadList(null);
|
||||||
|
if (list != null)
|
||||||
|
{
|
||||||
|
dataGridView.DataSource = list;
|
||||||
|
dataGridView.Columns["Id"].Visible = false;
|
||||||
|
dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
}
|
||||||
|
_logger.LogInformation("Загрузка исполнителей");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка загрузки исполнителей");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
|
||||||
|
MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ButtonAdd_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormImplementer));
|
||||||
|
if (service is FormImplementer form)
|
||||||
|
{
|
||||||
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ButtonUpd_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (dataGridView.SelectedRows.Count == 1)
|
||||||
|
{
|
||||||
|
var service = Program.ServiceProvider?.GetService(typeof(FormImplementer));
|
||||||
|
if (service is FormImplementer form)
|
||||||
|
{
|
||||||
|
form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||||
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ButtonDel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (dataGridView.SelectedRows.Count == 1)
|
||||||
|
{
|
||||||
|
if (MessageBox.Show("Удалить запись?", "Вопрос",
|
||||||
|
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
int id =
|
||||||
|
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||||
|
_logger.LogInformation("Удаление исполнителя");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!_logic.Delete(new ImplementerBindingModel
|
||||||
|
{
|
||||||
|
Id = id
|
||||||
|
}))
|
||||||
|
{
|
||||||
|
throw new Exception("Ошибка при удалении. Дополнительная информация в логах.");
|
||||||
|
}
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка удаления исполнителя");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка",
|
||||||
|
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void ButtonRef_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
60
Confectionery/FormViewImplementers.resx
Normal file
60
Confectionery/FormViewImplementers.resx
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<root>
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -41,11 +41,14 @@ namespace ConfectioneryView
|
|||||||
services.AddTransient<IOrderStorage, OrderStorage>();
|
services.AddTransient<IOrderStorage, OrderStorage>();
|
||||||
services.AddTransient<IPastryStorage, PastryStorage>();
|
services.AddTransient<IPastryStorage, PastryStorage>();
|
||||||
services.AddTransient<IClientStorage, ClientStorage>();
|
services.AddTransient<IClientStorage, ClientStorage>();
|
||||||
|
services.AddTransient<IImplementerStorage, ImplementerStorage>();
|
||||||
|
|
||||||
services.AddTransient<IComponentLogic, ComponentLogic>();
|
services.AddTransient<IComponentLogic, ComponentLogic>();
|
||||||
services.AddTransient<IOrderLogic, OrderLogic>();
|
services.AddTransient<IOrderLogic, OrderLogic>();
|
||||||
services.AddTransient<IPastryLogic, PastryLogic>();
|
services.AddTransient<IPastryLogic, PastryLogic>();
|
||||||
services.AddTransient<IReportLogic, ReportLogic>();
|
services.AddTransient<IReportLogic, ReportLogic>();
|
||||||
services.AddTransient<IClientLogic, ClientLogic>();
|
services.AddTransient<IClientLogic, ClientLogic>();
|
||||||
|
services.AddTransient<IImplementerLogic, ImplementerLogic>();
|
||||||
|
|
||||||
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
services.AddTransient<AbstractSaveToExcel, SaveToExcel>();
|
||||||
services.AddTransient<AbstractSaveToWord, SaveToWord>();
|
services.AddTransient<AbstractSaveToWord, SaveToWord>();
|
||||||
@ -61,6 +64,8 @@ namespace ConfectioneryView
|
|||||||
services.AddTransient<FormReportPastryComponents>();
|
services.AddTransient<FormReportPastryComponents>();
|
||||||
services.AddTransient<FormReportOrders>();
|
services.AddTransient<FormReportOrders>();
|
||||||
services.AddTransient<FormViewClients>();
|
services.AddTransient<FormViewClients>();
|
||||||
|
services.AddTransient<FormViewImplementers>();
|
||||||
|
services.AddTransient<FormImplementer>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user