почти исправила

This commit is contained in:
Елена Бакальская 2024-05-08 03:09:33 +04:00
parent 77a0ad2708
commit d2cf0e10b7

View File

@ -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);
}