From 066a366922a7d2911d9fd17564017b9c669dbe9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=BE=D0=BB=D0=B8=D0=BD=D0=B0=20=D0=A7=D1=83=D0=B1?= =?UTF-8?q?=D1=8B=D0=BA=D0=B8=D0=BD=D0=B0?= Date: Mon, 1 Apr 2024 13:01:23 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B2=D1=80=D0=BE=D0=B4=D0=B5=20=D1=82=D0=BE?= =?UTF-8?q?=D1=87=D0=BD=D0=BE=20=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=B0=D1=8F?= =?UTF-8?q?=20=D0=BB=D0=B0=D0=B1=D0=B0=201=20=D1=85=D0=B0=D1=80=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogics/ShopLogic.cs | 8 +-- .../ConfectioneryView/FormMain.Designer.cs | 2 +- .../ConfectioneryView/FormShop.Designer.cs | 62 +++++++++---------- .../ConfectioneryView/FormShops.Designer.cs | 2 +- Confectionery/ConfectioneryView/FormSupply.cs | 4 +- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Confectionery/ConfectioneryBusinessLogic/BusinessLogics/ShopLogic.cs b/Confectionery/ConfectioneryBusinessLogic/BusinessLogics/ShopLogic.cs index 47becbd..97b650b 100644 --- a/Confectionery/ConfectioneryBusinessLogic/BusinessLogics/ShopLogic.cs +++ b/Confectionery/ConfectioneryBusinessLogic/BusinessLogics/ShopLogic.cs @@ -96,7 +96,7 @@ namespace ConfectioneryBusinessLogic.BusinessLogics } if (count <= 0) { - throw new ArgumentException("Количество товаров(мороженого) в магазине должно быть больше нуля", nameof(count)); + throw new ArgumentException("Количество товаров(выпечки) в магазине должно быть больше нуля", nameof(count)); } _logger.LogInformation("Supply(GetElement). ShopName: {ShopName}. Id: {Id}", shopModel.ShopName, shopModel.Id); var shop = _shopStorage.GetElement(shopModel); @@ -107,9 +107,9 @@ namespace ConfectioneryBusinessLogic.BusinessLogics } if (shop.ShopPastries.ContainsKey(Pastry.Id)) { - var shopIC = shop.ShopPastries[Pastry.Id]; - shopIC.Item2 += count; - shop.ShopPastries[Pastry.Id] = shopIC; + var shopP = shop.ShopPastries[Pastry.Id]; + shopP.Item2 += count; + shop.ShopPastries[Pastry.Id] = shopP; _logger.LogInformation("Supply. Added {count} '{Pastry}' to '{ShopName}' shop", count, Pastry.PastryName, shop.ShopName); } diff --git a/Confectionery/ConfectioneryView/FormMain.Designer.cs b/Confectionery/ConfectioneryView/FormMain.Designer.cs index 7356071..320c09a 100644 --- a/Confectionery/ConfectioneryView/FormMain.Designer.cs +++ b/Confectionery/ConfectioneryView/FormMain.Designer.cs @@ -77,7 +77,7 @@ // this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem"; this.изделияToolStripMenuItem.Size = new System.Drawing.Size(224, 26); - this.изделияToolStripMenuItem.Text = "Изделия"; + this.изделияToolStripMenuItem.Text = "Выпечка"; this.изделияToolStripMenuItem.Click += new System.EventHandler(this.ИзделияToolStripMenuItem_Click); // // магазиныToolStripMenuItem diff --git a/Confectionery/ConfectioneryView/FormShop.Designer.cs b/Confectionery/ConfectioneryView/FormShop.Designer.cs index dea22e8..b0a9b9a 100644 --- a/Confectionery/ConfectioneryView/FormShop.Designer.cs +++ b/Confectionery/ConfectioneryView/FormShop.Designer.cs @@ -36,11 +36,11 @@ this.labelName = new System.Windows.Forms.Label(); this.groupBoxPastries = new System.Windows.Forms.GroupBox(); this.dataGridView = new System.Windows.Forms.DataGridView(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.buttonSave = new System.Windows.Forms.Button(); this.ColumnId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonSave = new System.Windows.Forms.Button(); this.groupBoxPastries.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); this.SuspendLayout(); @@ -51,9 +51,9 @@ this.labelOpeningDate.Location = new System.Drawing.Point(31, 102); this.labelOpeningDate.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.labelOpeningDate.Name = "labelOpeningDate"; - this.labelOpeningDate.Size = new System.Drawing.Size(117, 20); + this.labelOpeningDate.Size = new System.Drawing.Size(113, 20); this.labelOpeningDate.TabIndex = 12; - this.labelOpeningDate.Text = "Дата открытия :"; + this.labelOpeningDate.Text = "Дата открытия:"; // // dateTimePicker // @@ -77,9 +77,9 @@ this.labelAddress.Location = new System.Drawing.Point(31, 63); this.labelAddress.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.labelAddress.Name = "labelAddress"; - this.labelAddress.Size = new System.Drawing.Size(58, 20); + this.labelAddress.Size = new System.Drawing.Size(54, 20); this.labelAddress.TabIndex = 9; - this.labelAddress.Text = "Адрес :"; + this.labelAddress.Text = "Адрес:"; // // textBoxName // @@ -95,9 +95,9 @@ this.labelName.Location = new System.Drawing.Point(31, 23); this.labelName.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.labelName.Name = "labelName"; - this.labelName.Size = new System.Drawing.Size(84, 20); + this.labelName.Size = new System.Drawing.Size(80, 20); this.labelName.TabIndex = 7; - this.labelName.Text = "Название :"; + this.labelName.Text = "Название:"; // // groupBoxPastries // @@ -115,7 +115,7 @@ // this.dataGridView.AllowUserToAddRows = false; this.dataGridView.AllowUserToDeleteRows = false; - this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; + this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ActiveBorder; this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.ColumnId, @@ -133,28 +133,6 @@ this.dataGridView.Size = new System.Drawing.Size(522, 356); this.dataGridView.TabIndex = 0; // - // buttonCancel - // - this.buttonCancel.Location = new System.Drawing.Point(449, 529); - this.buttonCancel.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(101, 36); - this.buttonCancel.TabIndex = 15; - this.buttonCancel.Text = "Отмена"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click); - // - // buttonSave - // - this.buttonSave.Location = new System.Drawing.Point(330, 529); - this.buttonSave.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); - this.buttonSave.Name = "buttonSave"; - this.buttonSave.Size = new System.Drawing.Size(101, 36); - this.buttonSave.TabIndex = 14; - this.buttonSave.Text = "Сохранить"; - this.buttonSave.UseVisualStyleBackColor = true; - this.buttonSave.Click += new System.EventHandler(this.ButtonSave_Click); - // // ColumnId // this.ColumnId.HeaderText = "Id"; @@ -180,6 +158,28 @@ this.ColumnCount.ReadOnly = true; this.ColumnCount.Width = 125; // + // buttonCancel + // + this.buttonCancel.Location = new System.Drawing.Point(449, 529); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(101, 36); + this.buttonCancel.TabIndex = 15; + this.buttonCancel.Text = "Отмена"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.ButtonCancel_Click); + // + // buttonSave + // + this.buttonSave.Location = new System.Drawing.Point(330, 529); + this.buttonSave.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); + this.buttonSave.Name = "buttonSave"; + this.buttonSave.Size = new System.Drawing.Size(101, 36); + this.buttonSave.TabIndex = 14; + this.buttonSave.Text = "Сохранить"; + this.buttonSave.UseVisualStyleBackColor = true; + this.buttonSave.Click += new System.EventHandler(this.ButtonSave_Click); + // // FormShop // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); diff --git a/Confectionery/ConfectioneryView/FormShops.Designer.cs b/Confectionery/ConfectioneryView/FormShops.Designer.cs index 301e6bf..6e4e0bd 100644 --- a/Confectionery/ConfectioneryView/FormShops.Designer.cs +++ b/Confectionery/ConfectioneryView/FormShops.Designer.cs @@ -84,7 +84,7 @@ // this.dataGridView.AllowUserToAddRows = false; this.dataGridView.AllowUserToDeleteRows = false; - this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; + this.dataGridView.BackgroundColor = System.Drawing.SystemColors.ActiveBorder; this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView.Dock = System.Windows.Forms.DockStyle.Left; this.dataGridView.Location = new System.Drawing.Point(0, 0); diff --git a/Confectionery/ConfectioneryView/FormSupply.cs b/Confectionery/ConfectioneryView/FormSupply.cs index ad01fbb..edba0c4 100644 --- a/Confectionery/ConfectioneryView/FormSupply.cs +++ b/Confectionery/ConfectioneryView/FormSupply.cs @@ -75,7 +75,7 @@ namespace ConfectioneryView } if (comboBoxPastry.SelectedValue == null) { - MessageBox.Show("Выберите мороженое", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("Выберите выпечку", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (string.IsNullOrEmpty(textBoxCount.Text)) @@ -90,7 +90,7 @@ namespace ConfectioneryView { Id = Convert.ToInt32(comboBoxPastry.SelectedValue) }); if (pastry == null) { - throw new Exception("Мороженое не найдено."); + throw new Exception("Выпечка не найдена."); } var operationResult = _logicShop.Supply(new ShopSearchModel {