From a0c3608ec9508a6548af75136cb1135b07d31ff0 Mon Sep 17 00:00:00 2001 From: Alenka Date: Wed, 1 May 2024 15:28:49 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A5=D0=BE=D1=87=D1=83=20=D1=88=D0=B0=D1=88?= =?UTF-8?q?=D0=BB=D1=8B=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hospital/Hospital.sln | 6 +++--- .../Controllers/MedicineController.cs | 12 ++++++------ ...macistApp.csproj => HospitalPharmacistApp.csproj} | 0 3 files changed, 9 insertions(+), 9 deletions(-) rename Hospital/PharmacistApp/{PharmacistApp.csproj => HospitalPharmacistApp.csproj} (100%) diff --git a/Hospital/Hospital.sln b/Hospital/Hospital.sln index 84d0adb..1fb8d1a 100644 --- a/Hospital/Hospital.sln +++ b/Hospital/Hospital.sln @@ -11,11 +11,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HospitalBusinessLogic", "Ho EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HospitalDatabaseImplement", "HospitalDatabaseImplement\HospitalDatabaseImplement.csproj", "{651AD7CE-7821-4BDF-9FA4-4F61DC5CF5C4}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PharmacistApp", "PharmacistApp\PharmacistApp.csproj", "{5CE4060B-0791-4F09-A52D-EF3EFF4EBF03}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HospitalPharmacistApp", "PharmacistApp\HospitalPharmacistApp.csproj", "{5CE4060B-0791-4F09-A52D-EF3EFF4EBF03}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalRestApi", "HospitalRestApi\HospitalRestApi.csproj", "{C524A697-427E-40BD-955C-334255D958B7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HospitalRestApi", "HospitalRestApi\HospitalRestApi.csproj", "{C524A697-427E-40BD-955C-334255D958B7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HospitalDoctorApp", "HospitalDoctorApp\HospitalDoctorApp.csproj", "{0E3C0346-E31B-401F-8047-CE157D984F33}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HospitalDoctorApp", "HospitalDoctorApp\HospitalDoctorApp.csproj", "{0E3C0346-E31B-401F-8047-CE157D984F33}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Hospital/HospitalRestApi/Controllers/MedicineController.cs b/Hospital/HospitalRestApi/Controllers/MedicineController.cs index f5d6316..4137196 100644 --- a/Hospital/HospitalRestApi/Controllers/MedicineController.cs +++ b/Hospital/HospitalRestApi/Controllers/MedicineController.cs @@ -22,7 +22,7 @@ namespace HospitalRestApi.Controllers _medicine = medicine; } - /*[HttpGet] + [HttpGet] public Tuple>? GetMedicine(int medicineId) { try @@ -30,8 +30,8 @@ namespace HospitalRestApi.Controllers var elem = _medicine.ReadElement(new MedicineSearchModel { Id = medicineId }); if (elem == null) return null; - var res = Tuple.Create(elem, elem.ProcedureMedicines.Select(x => x.Value.AnimalName).ToList()); - res.Item1.MedicineAnimals = null!; + var res = Tuple.Create(elem, elem.MedicineRecipes.Select(x => x.Value.Description).ToList()); + res.Item1.MedicineRecipes = null!; return res; } catch (Exception ex) @@ -51,7 +51,7 @@ namespace HospitalRestApi.Controllers else res = _medicine.ReadList(new MedicineSearchModel { PharmacistId = pharmacistId }); foreach (var medicine in res) - medicine.ProcedureMedicines = null!; + medicine.MedicineRecipes = null!; return res; } catch (Exception ex) @@ -80,7 +80,7 @@ namespace HospitalRestApi.Controllers try { if (!isConnection) - model.ProcedureMedicines = null!; + model.MedicineRecipes = null!; return _medicine.Update(model); } catch (Exception ex) @@ -88,7 +88,7 @@ namespace HospitalRestApi.Controllers _logger.LogError(ex, "Не удалось обновить магазин"); throw; } - }*/ + } [HttpPost] public bool DeleteMedicine(MedicineBindingModel model) diff --git a/Hospital/PharmacistApp/PharmacistApp.csproj b/Hospital/PharmacistApp/HospitalPharmacistApp.csproj similarity index 100% rename from Hospital/PharmacistApp/PharmacistApp.csproj rename to Hospital/PharmacistApp/HospitalPharmacistApp.csproj