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)