diff --git a/BeautySalon/BeautySalon/FormService.cs b/BeautySalon/BeautySalon/FormService.cs index 6729dc8..9f0a21d 100644 --- a/BeautySalon/BeautySalon/FormService.cs +++ b/BeautySalon/BeautySalon/FormService.cs @@ -37,8 +37,9 @@ namespace BeautySalon var newService = new Service { ServiceId = _id ?? 0, - SpecialisationId = (comboBoxSpecialisation.SelectedItem as Service)!.ServiceId, - Price = (int)numericUpDownPrice.Value + SpecialisationId = (comboBoxSpecialisation.SelectedItem as Specialisation)!.SpecialisationId, + ServiceName = textBoxName.Text, + Price = (double)numericUpDownPrice.Value }; serviceStorage.Update(newService); } @@ -46,8 +47,9 @@ namespace BeautySalon { var newService = new Service { - SpecialisationId = (comboBoxSpecialisation.SelectedItem as Service)!.ServiceId, - Price = (int)numericUpDownPrice.Value + SpecialisationId = (comboBoxSpecialisation.SelectedItem as Specialisation)!.SpecialisationId, + ServiceName = textBoxName.Text, + Price = (double)numericUpDownPrice.Value }; serviceStorage.Add(newService); }