From 7214604c6705fd48364d2fcebb70146248d5d0a8 Mon Sep 17 00:00:00 2001 From: gg12 darfren Date: Sat, 27 Apr 2024 18:51:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=94=D0=95=D0=9B=D0=90=D0=9B=20=D0=A1?= =?UTF-8?q?=D0=94=D0=95=D0=9B=D0=90=D0=9B=20=D0=A1=D0=94=D0=95=D0=9B=D0=90?= =?UTF-8?q?=D0=9B=20=D0=A3=D0=A0=D0=90=D0=90=D0=90=D0=90=D0=90=D0=90=D0=90?= =?UTF-8?q?=D0=90=D0=90=D0=90=D0=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PharmacistApp/Controllers/HomeController.cs | 13 +++---------- .../PharmacistApp/Views/Home/UpdateMedicine.cshtml | 11 +++++++++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/VetClinic/PharmacistApp/Controllers/HomeController.cs b/VetClinic/PharmacistApp/Controllers/HomeController.cs index 96b8910..68ce4cc 100644 --- a/VetClinic/PharmacistApp/Controllers/HomeController.cs +++ b/VetClinic/PharmacistApp/Controllers/HomeController.cs @@ -239,7 +239,7 @@ View(APIPharmacist.GetRequest>($"api/medicine/getmedicin } [HttpGet] - public Tuple? GetMedicine(int medicineId) + public Tuple>? GetMedicine(int medicineId) { if (APIPharmacist.Pharmacist == null) { @@ -250,15 +250,8 @@ View(APIPharmacist.GetRequest>($"api/medicine/getmedicin { return default; } - string table = ""; - for (int i = 0; i < result.Item2.Count; i++) - { - var animal = result.Item2[i]; - table += ""; - table += $"{animal}"; - table += ""; - } - return Tuple.Create(result.Item1, table); + + return result; } [HttpGet] diff --git a/VetClinic/PharmacistApp/Views/Home/UpdateMedicine.cshtml b/VetClinic/PharmacistApp/Views/Home/UpdateMedicine.cshtml index eb1724a..d1ba160 100644 --- a/VetClinic/PharmacistApp/Views/Home/UpdateMedicine.cshtml +++ b/VetClinic/PharmacistApp/Views/Home/UpdateMedicine.cshtml @@ -25,10 +25,10 @@
Животные:
- @foreach (var animal in ViewBag.Animals) { - + }
@@ -44,15 +44,22 @@