From 32e642dc9087e90407766480f3c7114872a42f06 Mon Sep 17 00:00:00 2001 From: Artyom_Yashin Date: Wed, 14 Feb 2024 15:12:25 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB?= =?UTF-8?q?=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ComputersShop/FormShop.Designer.cs | 18 +++++++++--------- .../BusinessLogics/ShopLogic.cs | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ComputersShop/ComputersShop/FormShop.Designer.cs b/ComputersShop/ComputersShop/FormShop.Designer.cs index 1321c68..7341591 100644 --- a/ComputersShop/ComputersShop/FormShop.Designer.cs +++ b/ComputersShop/ComputersShop/FormShop.Designer.cs @@ -38,7 +38,7 @@ CancelButton = new Button(); DataGridView = new DataGridView(); ID = new DataGridViewTextBoxColumn(); - Name = new DataGridViewTextBoxColumn(); + ComputerName = new DataGridViewTextBoxColumn(); Price = new DataGridViewTextBoxColumn(); Count = new DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)DataGridView).BeginInit(); @@ -120,7 +120,7 @@ // DataGridView // DataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - DataGridView.Columns.AddRange(new DataGridViewColumn[] { ID, Name, Price, Count }); + DataGridView.Columns.AddRange(new DataGridViewColumn[] { ID, ComputerName, Price, Count }); DataGridView.Location = new Point(14, 132); DataGridView.Margin = new Padding(3, 4, 3, 4); DataGridView.Name = "DataGridView"; @@ -136,13 +136,13 @@ ID.Visible = false; ID.Width = 125; // - // Name + // ComputerName // - Name.HeaderText = "Название"; - Name.MinimumWidth = 6; - Name.Name = "Name"; - Name.ReadOnly = true; - Name.Width = 150; + ComputerName.HeaderText = "Название"; + ComputerName.MinimumWidth = 6; + ComputerName.Name = "ComputerName"; + ComputerName.ReadOnly = true; + ComputerName.Width = 150; // // Price // @@ -195,7 +195,7 @@ private Button CancelButton; private DataGridView DataGridView; private DataGridViewTextBoxColumn ID; - private DataGridViewTextBoxColumn Name; + private DataGridViewTextBoxColumn ComputerName; private DataGridViewTextBoxColumn Price; private DataGridViewTextBoxColumn Count; } diff --git a/ComputersShop/ComputersShopBusinessLogic/BusinessLogics/ShopLogic.cs b/ComputersShop/ComputersShopBusinessLogic/BusinessLogics/ShopLogic.cs index 26e3887..6d92da1 100644 --- a/ComputersShop/ComputersShopBusinessLogic/BusinessLogics/ShopLogic.cs +++ b/ComputersShop/ComputersShopBusinessLogic/BusinessLogics/ShopLogic.cs @@ -113,12 +113,12 @@ namespace ComputersShopBusinessLogic.BusinessLogics if (string.IsNullOrEmpty(model.Address)) { throw new ArgumentNullException("Нет адресса магазина", - nameof(model.ShopName)); + nameof(model.Address)); } if (model.DateOpen == null) { throw new ArgumentNullException("Нет даты открытия магазина", - nameof(model.ShopName)); + nameof(model.DateOpen)); } _logger.LogInformation("Shop. ShopName:{ShopName}.Address:{Address}. DateOpen:{DateOpen}. Id: { Id}", model.ShopName, model.Address, model.DateOpen, model.Id); var element = _shopStorage.GetElement(new ShopSearchModel