From b9b898380c1f68f517f0973f3ce1d754bf75974e Mon Sep 17 00:00:00 2001 From: Maxim Date: Tue, 19 Nov 2024 00:13:58 +0400 Subject: [PATCH] lab 1 ready 100% --- ProjectGSM/Forms/FormCase.cs | 4 ++-- ProjectGSM/Forms/FormStatusHistory.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectGSM/Forms/FormCase.cs b/ProjectGSM/Forms/FormCase.cs index 47d1424..924f6db 100644 --- a/ProjectGSM/Forms/FormCase.cs +++ b/ProjectGSM/Forms/FormCase.cs @@ -82,8 +82,8 @@ namespace ProjectGSM.Forms priceNumeric.Value, winPriceNumeric.Value, verdictCheckBox.Checked, - courtBox.SelectedIndex, - clientBox.SelectedIndex, + ((Court)courtBox.SelectedItem).Id, + ((Client)clientBox.SelectedItem).Id, textBox1.Text); } } diff --git a/ProjectGSM/Forms/FormStatusHistory.cs b/ProjectGSM/Forms/FormStatusHistory.cs index 16c4d43..f3001a6 100644 --- a/ProjectGSM/Forms/FormStatusHistory.cs +++ b/ProjectGSM/Forms/FormStatusHistory.cs @@ -36,7 +36,7 @@ namespace ProjectGSM.Forms { throw new Exception("Имеются незаполненные поля"); } - _statusHistoryRepository.CreateStatusHistory(StatusHistory.CreateEntity(caseBox.SelectedIndex, (Status)statusBox.SelectedIndex!, priceNumeric.Value, dateTimePicker1.Value)); + _statusHistoryRepository.CreateStatusHistory(StatusHistory.CreateEntity((((Case)caseBox.SelectedItem!)!).Id, (Status)statusBox.SelectedIndex!, priceNumeric.Value, dateTimePicker1.Value)); Close(); } catch (Exception ex)