лаба 2 правки
This commit is contained in:
parent
7ebcb8e97d
commit
77edac6d4b
@ -1,5 +1,4 @@
|
||||
using CarpentryWorkshop.Entities;
|
||||
using CarpentryWorkshop.Entities.Enums;
|
||||
using CarpentryWorkshop.Repositories;
|
||||
|
||||
namespace CarpentryWorkshop.Forms
|
||||
@ -34,7 +33,7 @@ namespace CarpentryWorkshop.Forms
|
||||
{
|
||||
InitializeComponent();
|
||||
_materialSpentRepository = materialSpentRepository ?? throw new ArgumentNullException(nameof(materialSpentRepository));
|
||||
comboBoxMaterial.DataSource = materialRepository.ReadMaterials();
|
||||
comboBoxMaterial.DataSource = materialRepository.ReadMaterials() ?? throw new ArgumentNullException(nameof(materialRepository));
|
||||
comboBoxMaterial.DisplayMember = "Name";
|
||||
comboBoxMaterial.ValueMember = "Id";
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ namespace CarpentryWorkshop.Forms
|
||||
comboBoxProduct.SelectedItem = product.Type;
|
||||
numericUpDownCount.Value = product.CountInWarehouse;
|
||||
_productId = value;
|
||||
|
||||
dataGridView.Rows.Clear();
|
||||
var rows = new List<DataGridViewRow>();
|
||||
|
||||
foreach (var productMaterial in product.ProductMaterial)
|
||||
{
|
||||
var material = _materialRepository.ReadMaterialById(productMaterial.MaterialId);
|
||||
|
Loading…
Reference in New Issue
Block a user