diff --git a/git/JurasicZoo/ZooClientApp/Controllers/HomeController.cs b/git/JurasicZoo/ZooClientApp/Controllers/HomeController.cs index 30fca8e..7a865ea 100644 --- a/git/JurasicZoo/ZooClientApp/Controllers/HomeController.cs +++ b/git/JurasicZoo/ZooClientApp/Controllers/HomeController.cs @@ -153,8 +153,8 @@ namespace ZooClientApp.Controllers { return Redirect("~/Home/Enter"); } - var helpme = APIClient.GetRequest>($"api/route/getroutes?clientid={APIClient.Client.Id}"); - return View(helpme); + + return View(APIClient.GetRequest>($"api/route/getroutes?Clientid={APIClient.Client.Id}")); } public IActionResult CreateRoute() { diff --git a/git/JurasicZoo/ZooClientApp/Views/Home/Index.cshtml b/git/JurasicZoo/ZooClientApp/Views/Home/Index.cshtml index ce53f9b..ec6a96d 100644 --- a/git/JurasicZoo/ZooClientApp/Views/Home/Index.cshtml +++ b/git/JurasicZoo/ZooClientApp/Views/Home/Index.cshtml @@ -7,9 +7,8 @@

Приложение "Зоопарк "Юрский период". Клиент"

- Посещения врача - Покупки лекарств - Политика + Посещения врача + Политика Отчеты Вход Регистрация diff --git a/git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531085434_initialcreate.Designer.cs b/git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531115435_initialcreate.Designer.cs similarity index 98% rename from git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531085434_initialcreate.Designer.cs rename to git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531115435_initialcreate.Designer.cs index 56646ad..ef1e606 100644 --- a/git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531085434_initialcreate.Designer.cs +++ b/git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531115435_initialcreate.Designer.cs @@ -12,7 +12,7 @@ using ZooDataBaseImplement; namespace ZooDataBaseImplement.Migrations { [DbContext(typeof(ZooDatabase))] - [Migration("20240531085434_initialcreate")] + [Migration("20240531115435_initialcreate")] partial class initialcreate { /// @@ -20,7 +20,7 @@ namespace ZooDataBaseImplement.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.18") + .HasAnnotation("ProductVersion", "7.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); diff --git a/git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531085434_initialcreate.cs b/git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531115435_initialcreate.cs similarity index 100% rename from git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531085434_initialcreate.cs rename to git/JurasicZoo/ZooDataBaseImplement/Migrations/20240531115435_initialcreate.cs diff --git a/git/JurasicZoo/ZooDataBaseImplement/Migrations/ZooDatabaseModelSnapshot.cs b/git/JurasicZoo/ZooDataBaseImplement/Migrations/ZooDatabaseModelSnapshot.cs index 7df34f2..a9d08b5 100644 --- a/git/JurasicZoo/ZooDataBaseImplement/Migrations/ZooDatabaseModelSnapshot.cs +++ b/git/JurasicZoo/ZooDataBaseImplement/Migrations/ZooDatabaseModelSnapshot.cs @@ -17,7 +17,7 @@ namespace ZooDataBaseImplement.Migrations { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.18") + .HasAnnotation("ProductVersion", "7.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); diff --git a/git/JurasicZoo/ZooDataBaseImplement/ZooDatabase.cs b/git/JurasicZoo/ZooDataBaseImplement/ZooDatabase.cs index 7a05d97..2eb0c3f 100644 --- a/git/JurasicZoo/ZooDataBaseImplement/ZooDatabase.cs +++ b/git/JurasicZoo/ZooDataBaseImplement/ZooDatabase.cs @@ -1,4 +1,5 @@ using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Collections; using System.Collections.Generic; @@ -9,7 +10,7 @@ using ZooDataBaseImplement.Models; namespace ZooDataBaseImplement { - public class ZooDatabase : DbContext + public class ZooDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) diff --git a/git/JurasicZoo/ZooRestApi/Controllers/RouteController.cs b/git/JurasicZoo/ZooRestApi/Controllers/RouteController.cs index 0bca7d9..0e39ff9 100644 --- a/git/JurasicZoo/ZooRestApi/Controllers/RouteController.cs +++ b/git/JurasicZoo/ZooRestApi/Controllers/RouteController.cs @@ -19,11 +19,11 @@ namespace ZooRestApi.Controllers _route = route; } [HttpGet] - public Tuple>? GetRoutes(int visitId) + public Tuple>? GetRoute(int routeId) { try { - var elem = _route.ReadElement(new RouteSearchModel { Id = visitId }); + var elem = _route.ReadElement(new RouteSearchModel { Id = routeId }); if (elem == null) { return null; @@ -33,12 +33,12 @@ namespace ZooRestApi.Controllers } catch (Exception ex) { - _logger.LogError(ex, "Ошибка получения визита по id={Id}", visitId); + _logger.LogError(ex, "Ошибка получения визита по id={Id}", routeId); throw; } } [HttpGet] - public List? GetRoute(int? clientId) + public List? GetRoutes(int? clientId) { try { @@ -52,7 +52,7 @@ namespace ZooRestApi.Controllers } [HttpGet] - public List GetAllVisits() + public List GetAllRoutes() { try { @@ -66,7 +66,7 @@ namespace ZooRestApi.Controllers } [HttpPost] - public bool CreateVisit(RouteBindingModel model) + public bool CreateRoute(RouteBindingModel model) { try { diff --git a/git/JurasicZoo/ZooShowEmployeeApp/Controllers/HomeController.cs b/git/JurasicZoo/ZooShowEmployeeApp/Controllers/HomeController.cs index 59ed204..ccdc9a3 100644 --- a/git/JurasicZoo/ZooShowEmployeeApp/Controllers/HomeController.cs +++ b/git/JurasicZoo/ZooShowEmployeeApp/Controllers/HomeController.cs @@ -21,8 +21,7 @@ namespace ZooShowEmployeeApp.Controllers { return Redirect("~/Home/Enter"); } - return - View(APIEmployee.GetRequest>($"api/main/getroutes?EmployeeId={APIEmployee.Employee.Id}")); + return View(); }