Доделаль

This commit is contained in:
Artyom_Yashin 2024-02-14 15:12:25 +04:00
parent f7acd30e65
commit 32e642dc90
2 changed files with 11 additions and 11 deletions

View File

@ -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;
}

View File

@ -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