лаба хард комплит

This commit is contained in:
Milana Ievlewa 2024-05-16 21:59:54 +04:00
parent a023f3b24a
commit e83c6ee11f
13 changed files with 842 additions and 81 deletions

View File

@ -32,14 +32,15 @@
справочникToolStripMenuItem = new ToolStripMenuItem(); справочникToolStripMenuItem = new ToolStripMenuItem();
компонентыToolStripMenuItem = new ToolStripMenuItem(); компонентыToolStripMenuItem = new ToolStripMenuItem();
изделияToolStripMenuItem = new ToolStripMenuItem(); изделияToolStripMenuItem = new ToolStripMenuItem();
магазиныToolStripMenuItem = new ToolStripMenuItem();
пополнениеМагазинаToolStripMenuItem = new ToolStripMenuItem();
продажаИзделийToolStripMenuItem = new ToolStripMenuItem();
buttonRef = new Button(); buttonRef = new Button();
buttonIssuedOrder = new Button(); buttonIssuedOrder = new Button();
buttonOrderReady = new Button(); buttonOrderReady = new Button();
buttonTakeOrderInWork = new Button(); buttonTakeOrderInWork = new Button();
buttonCreateOrder = new Button(); buttonCreateOrder = new Button();
dataGridView = new DataGridView(); dataGridView = new DataGridView();
магазиныToolStripMenuItem = new ToolStripMenuItem();
пополнениеМагазинаToolStripMenuItem = new ToolStripMenuItem();
menuStrip1.SuspendLayout(); menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout(); SuspendLayout();
@ -47,7 +48,7 @@
// menuStrip1 // menuStrip1
// //
menuStrip1.ImageScalingSize = new Size(20, 20); menuStrip1.ImageScalingSize = new Size(20, 20);
menuStrip1.Items.AddRange(new ToolStripItem[] { справочникToolStripMenuItem, пополнениеМагазинаToolStripMenuItem }); menuStrip1.Items.AddRange(new ToolStripItem[] { справочникToolStripMenuItem, пополнениеМагазинаToolStripMenuItem, продажаИзделийToolStripMenuItem });
menuStrip1.Location = new Point(0, 0); menuStrip1.Location = new Point(0, 0);
menuStrip1.Name = "menuStrip1"; menuStrip1.Name = "menuStrip1";
menuStrip1.Padding = new Padding(6, 3, 0, 3); menuStrip1.Padding = new Padding(6, 3, 0, 3);
@ -76,6 +77,27 @@
изделияToolStripMenuItem.Text = "Изделия"; изделияToolStripMenuItem.Text = "Изделия";
изделияToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click; изделияToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click;
// //
// магазиныToolStripMenuItem
//
магазиныToolStripMenuItem.Name = агазиныToolStripMenuItem";
магазиныToolStripMenuItem.Size = new Size(224, 26);
магазиныToolStripMenuItem.Text = "Магазины";
магазиныToolStripMenuItem.Click += МагазиныToolStripMenuItem_Click;
//
// пополнениеМагазинаToolStripMenuItem
//
пополнениеМагазинаToolStripMenuItem.Name = "пополнениеМагазинаToolStripMenuItem";
пополнениеМагазинаToolStripMenuItem.Size = new Size(182, 24);
пополнениеМагазинаToolStripMenuItem.Text = "Пополнение магазина";
пополнениеМагазинаToolStripMenuItem.Click += ПополнениеМагазинаToolStripMenuItem_Click;
//
// продажаИзделийToolStripMenuItem
//
продажаИзделийToolStripMenuItem.Name = "продажаИзделийToolStripMenuItem";
продажаИзделийToolStripMenuItem.Size = new Size(149, 24);
продажаИзделийToolStripMenuItem.Text = "Продажа изделий";
продажаИзделийToolStripMenuItem.Click += ПродажаИзделийToolStripMenuItem_Click;
//
// buttonRef // buttonRef
// //
buttonRef.Location = new Point(931, 273); buttonRef.Location = new Point(931, 273);
@ -84,7 +106,7 @@
buttonRef.TabIndex = 23; buttonRef.TabIndex = 23;
buttonRef.Text = "Обновить список"; buttonRef.Text = "Обновить список";
buttonRef.UseVisualStyleBackColor = true; buttonRef.UseVisualStyleBackColor = true;
buttonRef.Click += ButtonRef_Click; buttonRef.Click += ButtonUpd_Click;
// //
// buttonIssuedOrder // buttonIssuedOrder
// //
@ -136,20 +158,6 @@
dataGridView.Size = new Size(925, 374); dataGridView.Size = new Size(925, 374);
dataGridView.TabIndex = 18; dataGridView.TabIndex = 18;
// //
// магазиныToolStripMenuItem
//
магазиныToolStripMenuItem.Name = агазиныToolStripMenuItem";
магазиныToolStripMenuItem.Size = new Size(224, 26);
магазиныToolStripMenuItem.Text = "Магазины";
магазиныToolStripMenuItem.Click += МагазиныToolStripMenuItem_Click;
//
// пополнениеМагазинаToolStripMenuItem
//
пополнениеМагазинаToolStripMenuItem.Name = "пополнениеМагазинаToolStripMenuItem";
пополнениеМагазинаToolStripMenuItem.Size = new Size(182, 24);
пополнениеМагазинаToolStripMenuItem.Text = "Пополнение магазина";
пополнениеМагазинаToolStripMenuItem.Click += ПополнениеМагазинаToolStripMenuItem_Click;
//
// FormMain // FormMain
// //
AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
@ -187,5 +195,6 @@
private DataGridView dataGridView; private DataGridView dataGridView;
private ToolStripMenuItem магазиныToolStripMenuItem; private ToolStripMenuItem магазиныToolStripMenuItem;
private ToolStripMenuItem пополнениеМагазинаToolStripMenuItem; private ToolStripMenuItem пополнениеМагазинаToolStripMenuItem;
private ToolStripMenuItem продажаИзделийToolStripMenuItem;
} }
} }

View File

@ -38,15 +38,15 @@ namespace PrecastConcretePlantView
dataGridView.Columns["ReinforcedId"].Visible = false; dataGridView.Columns["ReinforcedId"].Visible = false;
dataGridView.Columns["reinforcedName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dataGridView.Columns["reinforcedName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
} }
_logger.LogInformation("青沭箸赅 玎赅珙<E8B585>"); _logger.LogInformation("Загрузка заказов");
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "硒栳赅 玎沭箸觇 玎赅珙<E8B585>"); _logger.LogError(ex, "Ошибка загрузки заказов");
MessageBox.Show(ex.Message, "硒栳赅", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void КомпонентыToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var service = var service =
Program.ServiceProvider?.GetService(typeof(FormComponentS)); Program.ServiceProvider?.GetService(typeof(FormComponentS));
@ -55,8 +55,7 @@ namespace PrecastConcretePlantView
form.ShowDialog(); form.ShowDialog();
} }
} }
private void <EFBFBD>ToolStripMenuItem_Click(object sender, EventArgs e) private void ИзделияToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var service = Program.ServiceProvider?.GetService(typeof(FormReinforcedS)); var service = Program.ServiceProvider?.GetService(typeof(FormReinforcedS));
if (service is FormReinforcedS form) if (service is FormReinforcedS form)
@ -64,7 +63,7 @@ namespace PrecastConcretePlantView
form.ShowDialog(); form.ShowDialog();
} }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void МагазиныToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var service = Program.ServiceProvider?.GetService(typeof(FormShops)); var service = Program.ServiceProvider?.GetService(typeof(FormShops));
if (service is FormShops form) if (service is FormShops form)
@ -72,7 +71,7 @@ namespace PrecastConcretePlantView
form.ShowDialog(); form.ShowDialog();
} }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ПополнениеМагазинаToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var service = Program.ServiceProvider?.GetService(typeof(FormShopReplenishment)); var service = Program.ServiceProvider?.GetService(typeof(FormShopReplenishment));
if (service is FormShopReplenishment form) if (service is FormShopReplenishment form)
@ -80,7 +79,7 @@ namespace PrecastConcretePlantView
form.ShowDialog(); form.ShowDialog();
} }
} }
private void ToolStripMenuItem_Click(object sender, EventArgs e) private void ПродажаИзделийToolStripMenuItem_Click(object sender, EventArgs e)
{ {
var service = Program.ServiceProvider?.GetService(typeof(FormReinforcedSale)); var service = Program.ServiceProvider?.GetService(typeof(FormReinforcedSale));
if (service is FormReinforcedSale form) if (service is FormReinforcedSale form)
@ -104,20 +103,20 @@ namespace PrecastConcretePlantView
{ {
int id = int id =
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
_logger.LogInformation("青赅<E99D92> 箋id}. 体<><E4BD93>弪<EFBFBD><E5BCAA> 耱囹篑 磬 '<27> 疣犷蝈'", id); _logger.LogInformation("Заказ {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("硒栳赅 镳<> 耦躔囗屙梃.念镱腠栩咫<E6A0A9><E592AB><EFBFBD> 桧纛痨圉<E797A8><E59C89> <20> 腩汔<E885A9>."); throw new Exception("Ошибка при сохранении.Дополнительная информация в логах.");
} }
LoadData(); LoadData();
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "硒栳赅 镥疱溧麒 玎赅玎 <20> 疣犷蝮"); _logger.LogError(ex, "Ошибка передачи заказа в работу");
MessageBox.Show(ex.Message, "硒栳赅", MessageBoxButtons.OK, MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
MessageBoxIcon.Error); MessageBoxIcon.Error);
} }
} }
@ -128,7 +127,7 @@ namespace PrecastConcretePlantView
{ {
int id = int id =
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
_logger.LogInformation("青赅<E99D92> 箋id}. 体<><E4BD93>弪<EFBFBD><E5BCAA> 耱囹篑 磬 '妙蝾<E5A699>'", _logger.LogInformation("Заказ {id}. Меняется статус на 'Готов'",
id); id);
try try
{ {
@ -137,14 +136,14 @@ namespace PrecastConcretePlantView
{ Id = id }); { Id = id });
if (!operationResult) if (!operationResult)
{ {
throw new Exception("硒栳赅 镳<> 耦躔囗屙梃. 念镱腠栩咫<E6A0A9><E592AB><EFBFBD> 桧纛痨圉<E797A8><E59C89> <20> 腩汔<E885A9>."); throw new Exception("Ошибка при сохранении. Дополнительная информация в логах.");
} }
LoadData(); LoadData();
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "硒栳赅 铗戾蜿<E688BE> <20> 泐蝾忭铖蜩 玎赅玎"); _logger.LogError(ex, "Ошибка отметки о готовности заказа");
MessageBox.Show(ex.Message, "硒栳赅", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
} }
@ -154,21 +153,21 @@ namespace PrecastConcretePlantView
{ {
int id = int id =
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
_logger.LogInformation("青赅<E99D92> 箋id}. 体<><E4BD93>弪<EFBFBD><E5BCAA> 耱囹篑 磬 '蔓溧<E89493>'", id); _logger.LogInformation("Заказ {id}. Меняется статус на 'Выдан'", id);
try try
{ {
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel { Id = id }); var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel { Id = id });
if (!operationResult) if (!operationResult)
{ {
throw new Exception("硒栳赅"); throw new Exception("Ошибка");
} }
_logger.LogInformation("青赅<E99D92> 箋id} 恹溧<E681B9>", id); _logger.LogInformation("Заказ {id} выдан", id);
LoadData(); LoadData();
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "硒栳赅 铗戾蜿<E688BE> <20> 恹溧麒 玎赅玎"); _logger.LogError(ex, "Ошибка отметки о выдачи заказа");
MessageBox.Show(ex.Message, "硒栳赅", MessageBoxButtons.OK, MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK,
MessageBoxIcon.Error); MessageBoxIcon.Error);
} }
} }

View File

@ -0,0 +1,128 @@
namespace PrecastConcretePlantView
{
partial class FormReinforcedSale
{
/// <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()
{
buttonCancel = new Button();
buttonSale = new Button();
textBoxCount = new TextBox();
labelCount = new Label();
comboBoxReinforced = new ComboBox();
labelReinforced = new Label();
SuspendLayout();
//
// buttonCancel
//
buttonCancel.Location = new Point(289, 111);
buttonCancel.Margin = new Padding(5, 4, 5, 4);
buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(101, 36);
buttonCancel.TabIndex = 17;
buttonCancel.Text = "Отмена";
buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += ButtonCancel_Click;
//
// buttonSale
//
buttonSale.Location = new Point(182, 111);
buttonSale.Margin = new Padding(5, 4, 5, 4);
buttonSale.Name = "buttonSale";
buttonSale.Size = new Size(101, 36);
buttonSale.TabIndex = 16;
buttonSale.Text = "Продать";
buttonSale.UseVisualStyleBackColor = true;
buttonSale.Click += ButtonSale_Click;
//
// textBoxCount
//
textBoxCount.Location = new Point(115, 68);
textBoxCount.Margin = new Padding(5, 4, 5, 4);
textBoxCount.Name = "textBoxCount";
textBoxCount.Size = new Size(287, 27);
textBoxCount.TabIndex = 15;
//
// labelCount
//
labelCount.AutoSize = true;
labelCount.Location = new Point(15, 72);
labelCount.Margin = new Padding(5, 0, 5, 0);
labelCount.Name = "labelCount";
labelCount.Size = new Size(93, 20);
labelCount.TabIndex = 14;
labelCount.Text = "Количество:";
//
// comboBoxReinforced
//
comboBoxReinforced.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxReinforced.FormattingEnabled = true;
comboBoxReinforced.Location = new Point(115, 20);
comboBoxReinforced.Margin = new Padding(5, 4, 5, 4);
comboBoxReinforced.Name = "comboBoxReinforced";
comboBoxReinforced.Size = new Size(287, 28);
comboBoxReinforced.TabIndex = 13;
//
// labelReinforced
//
labelReinforced.AutoSize = true;
labelReinforced.Location = new Point(15, 25);
labelReinforced.Margin = new Padding(5, 0, 5, 0);
labelReinforced.Name = "labelReinforced";
labelReinforced.Size = new Size(71, 20);
labelReinforced.TabIndex = 12;
labelReinforced.Text = "Изделие:";
//
// FormReinforcedSale
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(426, 164);
Controls.Add(buttonCancel);
Controls.Add(buttonSale);
Controls.Add(textBoxCount);
Controls.Add(labelCount);
Controls.Add(comboBoxReinforced);
Controls.Add(labelReinforced);
Margin = new Padding(3, 4, 3, 4);
Name = "FormReinforcedSale";
StartPosition = FormStartPosition.CenterScreen;
Text = "Продажа изделий";
Load += FormReinforcedSale_Load;
ResumeLayout(false);
PerformLayout();
}
#endregion
private Button buttonCancel;
private Button buttonSale;
private TextBox textBoxCount;
private Label labelCount;
private ComboBox comboBoxReinforced;
private Label labelReinforced;
}
}

View File

@ -0,0 +1,87 @@
using PrecastConcretePlantContracts.BusinessLogicsContracts;
using PrecastConcretePlantContracts.BindingModels;
using Microsoft.Extensions.Logging;
namespace PrecastConcretePlantView
{
public partial class FormReinforcedSale : Form
{
private readonly ILogger _logger;
private readonly IReinforcedLogic _logicReinforced;
private readonly IShopLogic _logicShop;
public FormReinforcedSale(ILogger<FormShopReplenishment> logger, IReinforcedLogic logicReinforced, IShopLogic logicShop)
{
InitializeComponent();
_logger = logger;
_logicReinforced = logicReinforced;
_logicShop = logicShop;
}
private void FormReinforcedSale_Load(object sender, EventArgs e)
{
_logger.LogInformation("Reinforceds loading");
try
{
var list = _logicReinforced.ReadList(null);
if (list != null)
{
comboBoxReinforced.DisplayMember = "ReinforcedName";
comboBoxReinforced.ValueMember = "Id";
comboBoxReinforced.DataSource = list;
comboBoxReinforced.SelectedItem = null;
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Reinforceds loading error");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void ButtonSale_Click(object sender, EventArgs e)
{
if (comboBoxReinforced.SelectedValue == null)
{
MessageBox.Show("Выберите изделие", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (string.IsNullOrEmpty(textBoxCount.Text))
{
MessageBox.Show("Заполните поле Количество", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
_logger.LogInformation("Reinforced sale");
try
{
var operationResult = _logicShop.MakeSale(
new ReinforcedBindingModel
{
Id = Convert.ToInt32(comboBoxReinforced.SelectedValue)
},
Convert.ToInt32(textBoxCount.Text)
);
if (!operationResult)
{
throw new Exception("Ошибка при продаже.");
}
MessageBox.Show("Продажа прошла успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
DialogResult = DialogResult.OK;
Close();
}
catch (Exception ex)
{
_logger.LogError(ex, "Reinforced sale error");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void ButtonCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<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>

View File

@ -36,11 +36,13 @@
labelOpeningDate = new Label(); labelOpeningDate = new Label();
groupBoxReinforceds = new GroupBox(); groupBoxReinforceds = new GroupBox();
dataGridView = new DataGridView(); dataGridView = new DataGridView();
buttonSave = new Button();
buttonCancel = new Button();
ColumnId = new DataGridViewTextBoxColumn(); ColumnId = new DataGridViewTextBoxColumn();
ColumnName = new DataGridViewTextBoxColumn(); ColumnName = new DataGridViewTextBoxColumn();
ColumnCount = new DataGridViewTextBoxColumn(); ColumnCount = new DataGridViewTextBoxColumn();
buttonSave = new Button();
buttonCancel = new Button();
textBoxMax = new Label();
textBoxMaximum = new TextBox();
groupBoxReinforceds.SuspendLayout(); groupBoxReinforceds.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout(); SuspendLayout();
@ -60,7 +62,7 @@
textBoxName.Location = new Point(105, 9); textBoxName.Location = new Point(105, 9);
textBoxName.Margin = new Padding(5, 4, 5, 4); textBoxName.Margin = new Padding(5, 4, 5, 4);
textBoxName.Name = "textBoxName"; textBoxName.Name = "textBoxName";
textBoxName.Size = new Size(287, 27); textBoxName.Size = new Size(302, 27);
textBoxName.TabIndex = 2; textBoxName.TabIndex = 2;
// //
// labelAddress // labelAddress
@ -78,7 +80,7 @@
textBoxAddress.Location = new Point(105, 49); textBoxAddress.Location = new Point(105, 49);
textBoxAddress.Margin = new Padding(5, 4, 5, 4); textBoxAddress.Margin = new Padding(5, 4, 5, 4);
textBoxAddress.Name = "textBoxAddress"; textBoxAddress.Name = "textBoxAddress";
textBoxAddress.Size = new Size(287, 27); textBoxAddress.Size = new Size(302, 27);
textBoxAddress.TabIndex = 4; textBoxAddress.TabIndex = 4;
// //
// dateTimePicker // dateTimePicker
@ -86,7 +88,7 @@
dateTimePicker.Location = new Point(144, 88); dateTimePicker.Location = new Point(144, 88);
dateTimePicker.Margin = new Padding(3, 4, 3, 4); dateTimePicker.Margin = new Padding(3, 4, 3, 4);
dateTimePicker.Name = "dateTimePicker"; dateTimePicker.Name = "dateTimePicker";
dateTimePicker.Size = new Size(249, 27); dateTimePicker.Size = new Size(263, 27);
dateTimePicker.TabIndex = 5; dateTimePicker.TabIndex = 5;
// //
// labelOpeningDate // labelOpeningDate
@ -102,11 +104,11 @@
// groupBoxReinforceds // groupBoxReinforceds
// //
groupBoxReinforceds.Controls.Add(dataGridView); groupBoxReinforceds.Controls.Add(dataGridView);
groupBoxReinforceds.Location = new Point(5, 133); groupBoxReinforceds.Location = new Point(5, 183);
groupBoxReinforceds.Margin = new Padding(5, 4, 5, 4); groupBoxReinforceds.Margin = new Padding(5, 4, 5, 4);
groupBoxReinforceds.Name = "groupBoxReinforceds"; groupBoxReinforceds.Name = "groupBoxReinforceds";
groupBoxReinforceds.Padding = new Padding(5, 4, 5, 4); groupBoxReinforceds.Padding = new Padding(5, 4, 5, 4);
groupBoxReinforceds.Size = new Size(536, 384); groupBoxReinforceds.Size = new Size(536, 395);
groupBoxReinforceds.TabIndex = 7; groupBoxReinforceds.TabIndex = 7;
groupBoxReinforceds.TabStop = false; groupBoxReinforceds.TabStop = false;
groupBoxReinforceds.Text = "Изделие"; groupBoxReinforceds.Text = "Изделие";
@ -127,31 +129,9 @@
dataGridView.RowHeadersVisible = false; dataGridView.RowHeadersVisible = false;
dataGridView.RowHeadersWidth = 51; dataGridView.RowHeadersWidth = 51;
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dataGridView.Size = new Size(522, 356); dataGridView.Size = new Size(522, 367);
dataGridView.TabIndex = 0; dataGridView.TabIndex = 0;
// //
// buttonSave
//
buttonSave.Location = new Point(291, 525);
buttonSave.Margin = new Padding(5, 4, 5, 4);
buttonSave.Name = "buttonSave";
buttonSave.Size = new Size(101, 36);
buttonSave.TabIndex = 8;
buttonSave.Text = "Сохранить";
buttonSave.UseVisualStyleBackColor = true;
buttonSave.Click += ButtonSave_Click;
//
// buttonCancel
//
buttonCancel.Location = new Point(410, 525);
buttonCancel.Margin = new Padding(5, 4, 5, 4);
buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(101, 36);
buttonCancel.TabIndex = 9;
buttonCancel.Text = "Отмена";
buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += ButtonCancel_Click;
//
// ColumnId // ColumnId
// //
ColumnId.HeaderText = "Id"; ColumnId.HeaderText = "Id";
@ -177,11 +157,51 @@
ColumnCount.ReadOnly = true; ColumnCount.ReadOnly = true;
ColumnCount.Width = 125; ColumnCount.Width = 125;
// //
// buttonSave
//
buttonSave.Location = new Point(306, 586);
buttonSave.Margin = new Padding(5, 4, 5, 4);
buttonSave.Name = "buttonSave";
buttonSave.Size = new Size(101, 36);
buttonSave.TabIndex = 8;
buttonSave.Text = "Сохранить";
buttonSave.UseVisualStyleBackColor = true;
buttonSave.Click += ButtonSave_Click;
//
// buttonCancel
//
buttonCancel.Location = new Point(417, 586);
buttonCancel.Margin = new Padding(5, 4, 5, 4);
buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(101, 36);
buttonCancel.TabIndex = 9;
buttonCancel.Text = "Отмена";
buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += ButtonCancel_Click;
//
// textBoxMax
//
textBoxMax.AutoSize = true;
textBoxMax.Location = new Point(16, 141);
textBoxMax.Name = "textBoxMax";
textBoxMax.Size = new Size(270, 20);
textBoxMax.TabIndex = 10;
textBoxMax.Text = "Максимальное колличество изделий:";
//
// textBoxMaximum
//
textBoxMaximum.Location = new Point(306, 138);
textBoxMaximum.Name = "textBoxMaximum";
textBoxMaximum.Size = new Size(101, 27);
textBoxMaximum.TabIndex = 11;
//
// FormShop // FormShop
// //
AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(546, 576); ClientSize = new Size(546, 635);
Controls.Add(textBoxMaximum);
Controls.Add(textBoxMax);
Controls.Add(buttonCancel); Controls.Add(buttonCancel);
Controls.Add(buttonSave); Controls.Add(buttonSave);
Controls.Add(groupBoxReinforceds); Controls.Add(groupBoxReinforceds);
@ -217,5 +237,7 @@
private DataGridViewTextBoxColumn ColumnId; private DataGridViewTextBoxColumn ColumnId;
private DataGridViewTextBoxColumn ColumnName; private DataGridViewTextBoxColumn ColumnName;
private DataGridViewTextBoxColumn ColumnCount; private DataGridViewTextBoxColumn ColumnCount;
private Label textBoxMax;
private TextBox textBoxMaximum;
} }
} }

View File

@ -4,7 +4,6 @@ using PrecastConcretePlantContracts.SearchModels;
using PrecastConcretePlantDataModels.Models; using PrecastConcretePlantDataModels.Models;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using PrecastConcretePlantListImplement.Models; using PrecastConcretePlantListImplement.Models;
using System.Windows.Forms;
namespace PrecastConcretePlantView namespace PrecastConcretePlantView
{ {
@ -41,6 +40,7 @@ namespace PrecastConcretePlantView
textBoxName.Text = view.ShopName; textBoxName.Text = view.ShopName;
textBoxAddress.Text = view.Address; textBoxAddress.Text = view.Address;
dateTimePicker.Value = view.DateOpening; dateTimePicker.Value = view.DateOpening;
textBoxMaximum.Text = view.ReinforcedsMax.ToString();
_shopReinforceds = view.ShopReinforceds ?? new Dictionary<int, (IReinforcedModel, int)>(); _shopReinforceds = view.ShopReinforceds ?? new Dictionary<int, (IReinforcedModel, int)>();
LoadData(); LoadData();
} }
@ -91,6 +91,11 @@ namespace PrecastConcretePlantView
MessageBox.Show("Заполните дату", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Заполните дату", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
if (string.IsNullOrEmpty(textBoxMaximum.Text))
{
MessageBox.Show("Заполните максимальное количество", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
_logger.LogInformation("Shop saving"); _logger.LogInformation("Shop saving");
try try
{ {
@ -100,6 +105,7 @@ namespace PrecastConcretePlantView
ShopName = textBoxName.Text, ShopName = textBoxName.Text,
Address = textBoxAddress.Text, Address = textBoxAddress.Text,
DateOpening = dateTimePicker.Value, DateOpening = dateTimePicker.Value,
ReinforcedsMax = Convert.ToInt32(textBoxMaximum.Text),
ShopReinforceds = _shopReinforceds ShopReinforceds = _shopReinforceds
}; };
var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model); var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model);

View File

@ -95,7 +95,7 @@ namespace PrecastConcretePlantView
{ {
throw new Exception("Изделие не найдено."); throw new Exception("Изделие не найдено.");
} }
var operationResult = _logicShop.RefillShop(new ShopSearchModel var operationResult = _logicShop.ReplenishShop(new ShopSearchModel
{ {
Id = Convert.ToInt32(comboBoxShop.SelectedValue) Id = Convert.ToInt32(comboBoxShop.SelectedValue)
}, },

View File

@ -0,0 +1,145 @@
namespace PrecastConcretePlantView
{
partial class FormShopReplenishment
{
/// <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()
{
labelShop = new Label();
labelReinforced = new Label();
labelCount = new Label();
comboBoxShop = new ComboBox();
comboBoxReinforced = new ComboBox();
textBoxCount = new TextBox();
buttonCancel = new Button();
buttonSave = new Button();
SuspendLayout();
//
// labelShop
//
labelShop.AutoSize = true;
labelShop.Location = new Point(27, 29);
labelShop.Name = "labelShop";
labelShop.Size = new Size(72, 20);
labelShop.TabIndex = 0;
labelShop.Text = "Магазин:";
//
// labelReinforced
//
labelReinforced.AutoSize = true;
labelReinforced.Location = new Point(27, 73);
labelReinforced.Name = "labelReinforced";
labelReinforced.Size = new Size(71, 20);
labelReinforced.TabIndex = 1;
labelReinforced.Text = "Изделие:";
//
// labelCount
//
labelCount.AutoSize = true;
labelCount.Location = new Point(27, 118);
labelCount.Name = "labelCount";
labelCount.Size = new Size(93, 20);
labelCount.TabIndex = 2;
labelCount.Text = "Количество:";
//
// comboBoxShop
//
comboBoxShop.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxShop.FormattingEnabled = true;
comboBoxShop.Location = new Point(136, 29);
comboBoxShop.Name = "comboBoxShop";
comboBoxShop.Size = new Size(239, 28);
comboBoxShop.TabIndex = 3;
//
// comboBoxReinforced
//
comboBoxReinforced.DropDownStyle = ComboBoxStyle.DropDownList;
comboBoxReinforced.FormattingEnabled = true;
comboBoxReinforced.Location = new Point(136, 73);
comboBoxReinforced.Name = "comboBoxReinforced";
comboBoxReinforced.Size = new Size(239, 28);
comboBoxReinforced.TabIndex = 4;
//
// textBoxCount
//
textBoxCount.Location = new Point(136, 118);
textBoxCount.Name = "textBoxCount";
textBoxCount.Size = new Size(239, 27);
textBoxCount.TabIndex = 5;
//
// buttonCancel
//
buttonCancel.Location = new Point(282, 162);
buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(93, 29);
buttonCancel.TabIndex = 6;
buttonCancel.Text = "Отмена";
buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += ButtonCancel_Click;
//
// buttonSave
//
buttonSave.Location = new Point(182, 162);
buttonSave.Name = "buttonSave";
buttonSave.Size = new Size(94, 29);
buttonSave.TabIndex = 7;
buttonSave.Text = "Сохранить";
buttonSave.UseVisualStyleBackColor = true;
buttonSave.Click += ButtonSave_Click;
//
// FormShopReplenishment
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(422, 203);
Controls.Add(buttonSave);
Controls.Add(buttonCancel);
Controls.Add(textBoxCount);
Controls.Add(comboBoxReinforced);
Controls.Add(comboBoxShop);
Controls.Add(labelCount);
Controls.Add(labelReinforced);
Controls.Add(labelShop);
Name = "FormShopReplenishment";
StartPosition = FormStartPosition.CenterScreen;
Text = "Пополнение магазина";
Load += FormShopReplenishment_Load;
ResumeLayout(false);
PerformLayout();
}
#endregion
private Label labelShop;
private Label labelReinforced;
private Label labelCount;
private ComboBox comboBoxShop;
private ComboBox comboBoxReinforced;
private TextBox textBoxCount;
private Button buttonCancel;
private Button buttonSave;
}
}

View File

@ -0,0 +1,126 @@
using Microsoft.Extensions.Logging;
using PrecastConcretePlantContracts.BusinessLogicsContracts;
using PrecastConcretePlantContracts.SearchModels;
using PrecastConcretePlantListImplement.Models;
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 PrecastConcretePlantView
{
public partial class FormShopReplenishment : Form
{
private readonly ILogger _logger;
private readonly IReinforcedLogic _logicReinforced;
private readonly IShopLogic _logicShop;
public FormShopReplenishment(ILogger<FormShopReplenishment> logger, IReinforcedLogic logicReinforced, IShopLogic logicShop)
{
InitializeComponent();
_logger = logger;
_logicReinforced = logicReinforced;
_logicShop = logicShop;
}
private void FormShopReplenishment_Load(object sender, EventArgs e)
{
_logger.LogInformation("Reinforceds loading");
try
{
var list = _logicReinforced.ReadList(null);
if (list != null)
{
comboBoxReinforced.DisplayMember = "ReinforcedName";
comboBoxReinforced.ValueMember = "Id";
comboBoxReinforced.DataSource = list;
comboBoxReinforced.SelectedItem = null;
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Reinforceds loading error");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
_logger.LogInformation("Shops loading");
try
{
var list = _logicShop.ReadList(null);
if (list != null)
{
comboBoxShop.DisplayMember = "ShopName";
comboBoxShop.ValueMember = "Id";
comboBoxShop.DataSource = list;
comboBoxShop.SelectedItem = null;
}
}
catch (Exception ex)
{
_logger.LogError(ex, "Shops loading error");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void ButtonSave_Click(object sender, EventArgs e)
{
if (comboBoxShop.SelectedValue == null)
{
MessageBox.Show("Выберите магазин", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (comboBoxReinforced.SelectedValue == null)
{
MessageBox.Show("Выберите изделие", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (string.IsNullOrEmpty(textBoxCount.Text))
{
MessageBox.Show("Заполните поле Количество", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
_logger.LogInformation("Shop replenishment");
try
{
var reinforced = _logicReinforced.ReadElement(new ReinforcedSearchModel
{ Id = Convert.ToInt32(comboBoxReinforced.SelectedValue) });
if (reinforced == null)
{
throw new Exception("Изделие не найдено.");
}
var operationResult = _logicShop.ReplenishShop(new ShopSearchModel
{
Id = Convert.ToInt32(comboBoxShop.SelectedValue)
},
reinforced, Convert.ToInt32(textBoxCount.Text));
if (!operationResult)
{
throw new Exception("Ошибка при проведении поставки.");
}
MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
DialogResult = DialogResult.OK;
Close();
}
catch (Exception ex)
{
_logger.LogError(ex, "Shop replenishment error");
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
DialogResult = DialogResult.OK;
Close();
}
private void ButtonCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<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>

View File

@ -1,7 +1,6 @@
using PrecastConcretePlantContracts.BindingModels; using PrecastConcretePlantContracts.BindingModels;
using PrecastConcretePlantContracts.BusinessLogicsContracts; using PrecastConcretePlantContracts.BusinessLogicsContracts;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System.Windows.Forms;
namespace PrecastConcretePlantView namespace PrecastConcretePlantView
{ {

View File

@ -1,11 +1,11 @@
using PrecastConcretePlantContracts.BusinessLogicsContracts;
using PrecastConcretePlantBusinessLogic.BusinessLogics;
using PrecastConcretePlantContracts.StoragesContracts;
using PrecastConcretePlantFileImplement.Implements;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using NLog.Extensions.Logging; using NLog.Extensions.Logging;
using PrecastConcretePlantBusinessLogic.BusinessLogics;
using PrecastConcretePlantContracts.BusinessLogicsContracts;
using PrecastConcretePlantContracts.StoragesContracts;
using PrecastConcretePlantFileImplement.Implements;
using System;
namespace PrecastConcretePlantView namespace PrecastConcretePlantView
{ {
@ -34,7 +34,6 @@ namespace PrecastConcretePlantView
option.SetMinimumLevel(LogLevel.Information); option.SetMinimumLevel(LogLevel.Information);
option.AddNLog("nlog.config"); option.AddNLog("nlog.config");
}); });
services.AddTransient<IComponentStorage, ComponentStorage>(); services.AddTransient<IComponentStorage, ComponentStorage>();
services.AddTransient<IOrderStorage, OrderStorage>(); services.AddTransient<IOrderStorage, OrderStorage>();
services.AddTransient<IReinforcedStorage, ReinforcedStorage>(); services.AddTransient<IReinforcedStorage, ReinforcedStorage>();
@ -54,7 +53,8 @@ namespace PrecastConcretePlantView
services.AddTransient<FormReinforcedS>(); services.AddTransient<FormReinforcedS>();
services.AddTransient<FormShop>(); services.AddTransient<FormShop>();
services.AddTransient<FormShops>(); services.AddTransient<FormShops>();
services.AddTransient<FormShopRefill>(); services.AddTransient<FormShopReplenishment>();
services.AddTransient<FormReinforcedSale>();
} }
} }
} }