This commit is contained in:
Илья Федотов 2024-05-01 21:21:08 +04:00
parent 64ba40c90c
commit 6b1c3008a2
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ namespace DinerView
{
dataGridView.DataSource = list;
dataGridView.Columns["ID"].Visible = false;
dataGridView.Columns["ProductName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
dataGridView.Columns["ComponentName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
_logger.LogInformation("Загрузка продуктов");
}

View File

@ -57,7 +57,7 @@ namespace DinerView
_list = logic.ReadList(null);
if (_list != null)
{
comboBoxComponent.DisplayMember = "ProductName";
comboBoxComponent.DisplayMember = "ComponentName";
comboBoxComponent.ValueMember = "ID";
comboBoxComponent.DataSource = _list;
comboBoxComponent.SelectedItem = null;

View File

@ -61,7 +61,7 @@ namespace DineryBusinessLogic.BusinessLogic
{
_logger.LogInformation("ReadList. ProductName:{ProductName}. ID:{ID}", model?.ComponentName, model?.ID);
var list = model == null ? _componentStorage.GetFullList() : _componentStorage.GetFilteredList(model);
if (list == null) {
if (list.Count == 0) {
_logger.LogWarning("ReadList return null list");
return null;
}