This commit is contained in:
shadowik 2023-05-03 22:59:06 +04:00
parent 5c684836d6
commit bec20cc03c
9 changed files with 20 additions and 20 deletions

View File

@ -62,7 +62,7 @@
this.labelPizza.Name = "labelPizza"; this.labelPizza.Name = "labelPizza";
this.labelPizza.Size = new System.Drawing.Size(75, 20); this.labelPizza.Size = new System.Drawing.Size(75, 20);
this.labelPizza.TabIndex = 2; this.labelPizza.TabIndex = 2;
this.labelPizza.Text = "Изделие: "; this.labelPizza.Text = "Пицца: ";
// //
// comboBoxPizza // comboBoxPizza
// //

View File

@ -60,7 +60,7 @@ namespace PizzeriaView
} }
if (comboBoxPizza.SelectedValue == null) if (comboBoxPizza.SelectedValue == null)
{ {
MessageBox.Show("Выберите изделие", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Выберите пиццу", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
_logger.LogInformation("Создание поставки"); _logger.LogInformation("Создание поставки");

View File

@ -31,7 +31,7 @@
this.buttonSaveToExcel = new System.Windows.Forms.Button(); this.buttonSaveToExcel = new System.Windows.Forms.Button();
this.dataGridView = new System.Windows.Forms.DataGridView(); this.dataGridView = new System.Windows.Forms.DataGridView();
this.ColumnShop = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnShop = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnReinforced = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnPizza = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
@ -55,7 +55,7 @@
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ColumnShop, this.ColumnShop,
this.ColumnReinforced, this.ColumnPizza,
this.ColumnCount}); this.ColumnCount});
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Bottom; this.dataGridView.Dock = System.Windows.Forms.DockStyle.Bottom;
this.dataGridView.Location = new System.Drawing.Point(0, 47); this.dataGridView.Location = new System.Drawing.Point(0, 47);
@ -74,13 +74,13 @@
this.ColumnShop.Name = "ColumnShop"; this.ColumnShop.Name = "ColumnShop";
this.ColumnShop.ReadOnly = true; this.ColumnShop.ReadOnly = true;
// //
// ColumnReinforced // ColumnPizza
// //
this.ColumnReinforced.FillWeight = 140F; this.ColumnPizza.FillWeight = 140F;
this.ColumnReinforced.HeaderText = "Изделие"; this.ColumnPizza.HeaderText = "Пицца";
this.ColumnReinforced.MinimumWidth = 6; this.ColumnPizza.MinimumWidth = 6;
this.ColumnReinforced.Name = "ColumnReinforced"; this.ColumnPizza.Name = "ColumnPizza";
this.ColumnReinforced.ReadOnly = true; this.ColumnPizza.ReadOnly = true;
// //
// ColumnCount // ColumnCount
// //
@ -90,14 +90,14 @@
this.ColumnCount.Name = "ColumnCount"; this.ColumnCount.Name = "ColumnCount";
this.ColumnCount.ReadOnly = true; this.ColumnCount.ReadOnly = true;
// //
// FormReportShopReinforcedes // FormReportShop
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(598, 450); this.ClientSize = new System.Drawing.Size(598, 450);
this.Controls.Add(this.buttonSaveToExcel); this.Controls.Add(this.buttonSaveToExcel);
this.Controls.Add(this.dataGridView); this.Controls.Add(this.dataGridView);
this.Name = "FormReportShopReinforcedes"; this.Name = "FormReportShop";
this.Text = "Наполненость магазинов"; this.Text = "Наполненость магазинов";
this.Load += new System.EventHandler(this.FormReportShop_Load); this.Load += new System.EventHandler(this.FormReportShop_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
@ -110,7 +110,7 @@
private Button buttonSaveToExcel; private Button buttonSaveToExcel;
private DataGridView dataGridView; private DataGridView dataGridView;
private DataGridViewTextBoxColumn ColumnShop; private DataGridViewTextBoxColumn ColumnShop;
private DataGridViewTextBoxColumn ColumnReinforced; private DataGridViewTextBoxColumn ColumnPizza;
private DataGridViewTextBoxColumn ColumnCount; private DataGridViewTextBoxColumn ColumnCount;
} }
} }

View File

@ -60,7 +60,7 @@
<metadata name="ColumnShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ColumnShop.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="ColumnReinforced.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ColumnPizza.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ColumnCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@ -61,7 +61,7 @@ namespace PizzeriaView
private void LoadData() private void LoadData()
{ {
_logger.LogInformation("Загрузка изделий в магазине"); _logger.LogInformation("Загрузка пиццы в магазине");
try try
{ {
if (_ShopPizzas != null) if (_ShopPizzas != null)
@ -75,7 +75,7 @@ namespace PizzeriaView
} }
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);
} }
} }

View File

@ -122,7 +122,7 @@ namespace PizzeriaBusinessLogic.BusinessLogics
public void SaveShopsToExcelFile(ReportBindingModel model) public void SaveShopsToExcelFile(ReportBindingModel model)
{ {
_saveToExcel.CreateShopReinforcedesReport(new ExcelShop _saveToExcel.CreateShopPizzasReport(new ExcelShop
{ {
FileName = model.FileName, FileName = model.FileName,
Title = "Наполненость магазинов", Title = "Наполненость магазинов",

View File

@ -90,7 +90,7 @@ namespace PizzeriaBusinessLogic.BusinessLogics
} }
if (model.Count <= 0) if (model.Count <= 0)
{ {
throw new ArgumentException("Количество изделий должно быть больше 0"); throw new ArgumentException("Количество пиццы должно быть больше 0");
} }
var shop = _shopStorage.GetElement(new ShopSearchModel var shop = _shopStorage.GetElement(new ShopSearchModel
{ {

View File

@ -82,7 +82,7 @@ namespace PizzeriaBusinessLogic.OfficePackage
SaveExcel(info); SaveExcel(info);
} }
public void CreateShopReinforcedesReport(ExcelShop info) public void CreateShopPizzasReport(ExcelShop info)
{ {
CreateExcel(info); CreateExcel(info);

View File

@ -10,6 +10,6 @@ namespace PizzeriaContracts.ViewModels
{ {
public string ShopName { get; set; } = string.Empty; public string ShopName { get; set; } = string.Empty;
public int TotalCount { get; set; } public int TotalCount { get; set; }
public List<(string Reinforced, int count)> Pizzas { get; set; } = new(); public List<(string Pizza, int count)> Pizzas { get; set; } = new();
} }
} }