From d98e21109def6280d843b276389abac4aee6725c Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 31 May 2024 17:27:40 +0400 Subject: [PATCH] po --- .../Controllers/HomeController.cs | 2 +- .../Implements/PreserveStorage.cs | 4 ---- .../Views/Home/UpdatePreserve.cshtml | 22 +++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 git/JurasicZoo/ZooShowEmployeeApp/Views/Home/UpdatePreserve.cshtml diff --git a/git/JurasicZoo/ZooClientApp/Controllers/HomeController.cs b/git/JurasicZoo/ZooClientApp/Controllers/HomeController.cs index 7a865ea..8dff787 100644 --- a/git/JurasicZoo/ZooClientApp/Controllers/HomeController.cs +++ b/git/JurasicZoo/ZooClientApp/Controllers/HomeController.cs @@ -162,7 +162,7 @@ namespace ZooClientApp.Controllers { return Redirect("~/Home/Enter"); } - ViewBag.Preserves = APIClient.GetRequest>($"api/preserve/getpreserves?clientid={APIClient.Client.Id}"); + ViewBag.Preserves = APIClient.GetRequest>($"api/preserve/getpreserves"); return View(); } [HttpPost] diff --git a/git/JurasicZoo/ZooDataBaseImplement/Implements/PreserveStorage.cs b/git/JurasicZoo/ZooDataBaseImplement/Implements/PreserveStorage.cs index 4de8fda..80b318d 100644 --- a/git/JurasicZoo/ZooDataBaseImplement/Implements/PreserveStorage.cs +++ b/git/JurasicZoo/ZooDataBaseImplement/Implements/PreserveStorage.cs @@ -23,10 +23,6 @@ namespace ZooDataBaseImplement.Implements public List GetFilteredList(PreserveSearchModel model) { - if (string.IsNullOrEmpty(model.PreserveName)) - { - return new(); - } using var context = new ZooDatabase(); return context.Preserves.Where(x => x.EmployeeId == model.EmployeeId) .Where(x => String.IsNullOrEmpty(model.PreserveName) || x.PreserveName.Contains(model.PreserveName)) diff --git a/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/UpdatePreserve.cshtml b/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/UpdatePreserve.cshtml new file mode 100644 index 0000000..68ed58d --- /dev/null +++ b/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/UpdatePreserve.cshtml @@ -0,0 +1,22 @@ +@{ + ViewData["Title"] = "UpdatePreserve"; +} +
+

Редактирование животного

+
+
+
+
Животное:
+
+ +
+
+
+
Возраст:
+
+
+
+
+
+
+