diff --git a/ProjectOpticsSalon/ProjectOpticsSalon/Forms/FormOrder.cs b/ProjectOpticsSalon/ProjectOpticsSalon/Forms/FormOrder.cs index 792107b..7d875a7 100644 --- a/ProjectOpticsSalon/ProjectOpticsSalon/Forms/FormOrder.cs +++ b/ProjectOpticsSalon/ProjectOpticsSalon/Forms/FormOrder.cs @@ -29,7 +29,7 @@ namespace ProjectOpticsSalon.Forms comboBoxClient.ValueMember = "Id"; ColumnProduct.DataSource = productRepository.ReadProducts(); - ColumnProduct.DisplayMember = "ProductType"; + ColumnProduct.DisplayMember = "Id"; ColumnProduct.ValueMember = "Id"; foreach (var elem in Enum.GetValues(typeof(OrderStatus))) diff --git a/ProjectOpticsSalon/ProjectOpticsSalon/Forms/FormProduction.cs b/ProjectOpticsSalon/ProjectOpticsSalon/Forms/FormProduction.cs index b3a553e..f484c1c 100644 --- a/ProjectOpticsSalon/ProjectOpticsSalon/Forms/FormProduction.cs +++ b/ProjectOpticsSalon/ProjectOpticsSalon/Forms/FormProduction.cs @@ -32,7 +32,7 @@ namespace ProjectOpticsSalon.Forms maskedTextBoxComponentsPrice.Text = production.ComponentsPrice.ToString(); maskedTextBoxWorkPrice.Text = production.WorkPrice.ToString(); - comboBoxProduct.SelectedItem = production.ProductId; + comboBoxProduct.SelectedValue = production.ProductId; _productionId = value; } @@ -48,7 +48,7 @@ namespace ProjectOpticsSalon.Forms InitializeComponent(); _productionRepository = productionRepository ?? throw new ArgumentNullException(nameof(productionRepository)); comboBoxProduct.DataSource = productRepository.ReadProducts(); - comboBoxProduct.DisplayMember = "FrameMaterial"; + comboBoxProduct.DisplayMember = "Id"; comboBoxProduct.ValueMember = "Id"; }