From d2cf0e10b7a9237d48c15766ddd259a5a984cb49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=91=D0=B0=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D1=81=D0=BA=D0=B0=D1=8F?= Date: Wed, 8 May 2024 03:09:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D1=87=D1=82=D0=B8=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeautySalon/BeautySalon/FormService.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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); }