From 94a79ac62202cfd540a4713047a2a6f388af9423 Mon Sep 17 00:00:00 2001 From: Yunusov_Niyaz Date: Wed, 1 May 2024 21:18:24 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=B0=D0=B9=D1=84=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/PetStorage.cs | 3 +-- .../Implements/VisitStorage.cs | 2 +- .../Controllers/HomeController.cs | 2 +- .../Views/Home/CreatePurchase.cshtml | 11 +++++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/VeterinaryView/VeterinaryDatabaseImplement/Implements/PetStorage.cs b/VeterinaryView/VeterinaryDatabaseImplement/Implements/PetStorage.cs index 0077c77..ffbaa6b 100644 --- a/VeterinaryView/VeterinaryDatabaseImplement/Implements/PetStorage.cs +++ b/VeterinaryView/VeterinaryDatabaseImplement/Implements/PetStorage.cs @@ -15,8 +15,7 @@ namespace VeterinaryDatabaseImplement.Implements .Select(x => x.GetViewModel) .ToList(); } - public List GetFilteredList(PetSearchModel - model) + public List GetFilteredList(PetSearchModel model) { if (string.IsNullOrEmpty(model.PetName)) { diff --git a/VeterinaryView/VeterinaryDatabaseImplement/Implements/VisitStorage.cs b/VeterinaryView/VeterinaryDatabaseImplement/Implements/VisitStorage.cs index 2742453..9606579 100644 --- a/VeterinaryView/VeterinaryDatabaseImplement/Implements/VisitStorage.cs +++ b/VeterinaryView/VeterinaryDatabaseImplement/Implements/VisitStorage.cs @@ -20,7 +20,7 @@ namespace VeterinaryDatabaseImplement.Implements { if (string.IsNullOrEmpty(model.VisitName)) { - return null; + return new(); } using var context = new VeterinaryDatabase(); return context.Visits.Include(x => x.Owner).Include(x => x.Pets).ThenInclude(x => x.Pet).Include(x => x.Doctor) diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs b/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs index 2f4bb0e..48b2be2 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs +++ b/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs @@ -221,7 +221,7 @@ namespace VeterinaryShowOwnerApp.Controllers { return Redirect("~/Home/Enter"); } - ViewBag.Pets = APIOwner.GetRequest>($"api/pet/getpet?ownerid={APIOwner.Owner.Id}"); + ViewBag.Pets = APIOwner.GetRequest>($"api/pet/getpets?ownerid={APIOwner.Owner.Id}"); return View(); } diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/CreatePurchase.cshtml b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/CreatePurchase.cshtml index 51e7b5a..e2f3800 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/CreatePurchase.cshtml +++ b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/CreatePurchase.cshtml @@ -12,6 +12,17 @@ +
+
Животные:
+
+ +
+
Количество: