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 @@