diff --git a/project/ProjectTourAgency/Forms/FormClientTour.cs b/project/ProjectTourAgency/Forms/FormClientTour.cs index 76552b8..bca1e98 100644 --- a/project/ProjectTourAgency/Forms/FormClientTour.cs +++ b/project/ProjectTourAgency/Forms/FormClientTour.cs @@ -52,8 +52,9 @@ namespace ProjectTourAgency.Forms { throw new Exception("Есть незаполненные поля"); } - _tourRepository.CreateTour(Tour.CreateEntity(0, comboBoxEmployeeId.SelectedIndex, - comboBoxRouteId.SelectedIndex, dateTimePicker.Value,CreateListClientTourFromDataGrid())); + _tourRepository.CreateTour(Tour.CreateEntity(0, (int)comboBoxEmployeeId.SelectedValue, + (int)comboBoxRouteId.SelectedValue, dateTimePicker.Value,CreateListClientTourFromDataGrid())); + Close(); } catch (Exception ex) {