From 3f62f48c050c2621e53ab458e948d50980a11654 Mon Sep 17 00:00:00 2001 From: "kagbie3nn@mail.ru" Date: Fri, 31 May 2024 23:47:28 +0400 Subject: [PATCH] =?UTF-8?q?=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReportPreserversPriceSearchModels.cs | 15 ++++++ .../ReportRoutesCostsSearchModels.cs | 15 ++++++ .../ZooContracts/ViewModels/Class2.cs | 12 +++++ .../ViewModels/ReportRoutesCostsViewModel.cs | 16 +++++++ .../ZooRestApi/Controllers/Count.cs | 6 +++ .../Controllers/ReportClientController.cs | 48 +++++++++++++++++++ .../Views/Home/IndexPreserve.cshtml | 2 +- .../Views/Home/Reports.cshtml | 2 +- .../Views/Home/UpdatePreserve.cshtml | 6 +-- 9 files changed, 117 insertions(+), 5 deletions(-) create mode 100644 git/JurasicZoo/ZooContracts/SearchModels/ReportPreserversPriceSearchModels.cs create mode 100644 git/JurasicZoo/ZooContracts/SearchModels/ReportRoutesCostsSearchModels.cs create mode 100644 git/JurasicZoo/ZooContracts/ViewModels/Class2.cs create mode 100644 git/JurasicZoo/ZooContracts/ViewModels/ReportRoutesCostsViewModel.cs create mode 100644 git/JurasicZoo/ZooRestApi/Controllers/Count.cs create mode 100644 git/JurasicZoo/ZooRestApi/Controllers/ReportClientController.cs diff --git a/git/JurasicZoo/ZooContracts/SearchModels/ReportPreserversPriceSearchModels.cs b/git/JurasicZoo/ZooContracts/SearchModels/ReportPreserversPriceSearchModels.cs new file mode 100644 index 0000000..f9decbe --- /dev/null +++ b/git/JurasicZoo/ZooContracts/SearchModels/ReportPreserversPriceSearchModels.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZooContracts.SearchModels +{ + public class ReportPreserversPriceSearchModels + { + public List? PreserveIds { get; set; } + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } +} diff --git a/git/JurasicZoo/ZooContracts/SearchModels/ReportRoutesCostsSearchModels.cs b/git/JurasicZoo/ZooContracts/SearchModels/ReportRoutesCostsSearchModels.cs new file mode 100644 index 0000000..65bac46 --- /dev/null +++ b/git/JurasicZoo/ZooContracts/SearchModels/ReportRoutesCostsSearchModels.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZooContracts.SearchModels +{ + public class ReportRoutesCostsSearchModels + { + public List? RoutesIds { get; set; } + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } +} diff --git a/git/JurasicZoo/ZooContracts/ViewModels/Class2.cs b/git/JurasicZoo/ZooContracts/ViewModels/Class2.cs new file mode 100644 index 0000000..167e7c7 --- /dev/null +++ b/git/JurasicZoo/ZooContracts/ViewModels/Class2.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZooContracts.ViewModels +{ + internal class ReportPreserversPriceViewModel + { + } +} diff --git a/git/JurasicZoo/ZooContracts/ViewModels/ReportRoutesCostsViewModel.cs b/git/JurasicZoo/ZooContracts/ViewModels/ReportRoutesCostsViewModel.cs new file mode 100644 index 0000000..73a10c5 --- /dev/null +++ b/git/JurasicZoo/ZooContracts/ViewModels/ReportRoutesCostsViewModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZooContracts.ViewModels +{ + public class ReportRoutesCostsViewModel + { + public string RouteName { get; set; } = string.Empty; + + + // public List Drugs { get; set; } + } +} diff --git a/git/JurasicZoo/ZooRestApi/Controllers/Count.cs b/git/JurasicZoo/ZooRestApi/Controllers/Count.cs new file mode 100644 index 0000000..c36bf3b --- /dev/null +++ b/git/JurasicZoo/ZooRestApi/Controllers/Count.cs @@ -0,0 +1,6 @@ +namespace ZooRestApi.Controllers +{ + public class Count + { + } +} diff --git a/git/JurasicZoo/ZooRestApi/Controllers/ReportClientController.cs b/git/JurasicZoo/ZooRestApi/Controllers/ReportClientController.cs new file mode 100644 index 0000000..6a91387 --- /dev/null +++ b/git/JurasicZoo/ZooRestApi/Controllers/ReportClientController.cs @@ -0,0 +1,48 @@ +using Microsoft.AspNetCore.Mvc; +using ZooContracts.BindingModels; +using ZooContracts.BusinessLogicsContracts; + +namespace ZooRestApi.Controllers +{ + [Route("api/[controller]/[action]")] + [ApiController] + public class ReportClientController : Controller + { + private readonly ILogger _logger; + private readonly IReportClientLogic _reportClient; + public ReportClientController(ILogger logger, IReportClientLogic reportClient) + { + _reportClient = reportClient; + _logger = logger; + } + [Microsoft.AspNetCore.Mvc.HttpGet] + public IActionResult Index(IReportClientLogic reportClient) + { + return View(); + } + [HttpPost] + public void CreateServiceListWordFile(ReportPreserveBindingModel model) + { + try + { + _reportClient.SavePreservesToWordFile(model); + } + catch (Exception ex) + { + throw; + } + } + [HttpPost] + public void CreateServiceListExcelFile(ReportPreserveBindingModel model) + { + try + { + _reportClient.SavePreservesToExcelFile(model); + } + catch (Exception ex) + { + throw; + } + } + } +} diff --git a/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/IndexPreserve.cshtml b/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/IndexPreserve.cshtml index 6b61480..4d86e35 100644 --- a/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/IndexPreserve.cshtml +++ b/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/IndexPreserve.cshtml @@ -35,7 +35,7 @@ Стоимость - Удалить животное + Удалить заповедник diff --git a/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/Reports.cshtml b/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/Reports.cshtml index 6df2a91..0e6bb86 100644 --- a/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/Reports.cshtml +++ b/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/Reports.cshtml @@ -6,7 +6,7 @@

Отчеты

diff --git a/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/UpdatePreserve.cshtml b/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/UpdatePreserve.cshtml index 68ed58d..60df51a 100644 --- a/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/UpdatePreserve.cshtml +++ b/git/JurasicZoo/ZooShowEmployeeApp/Views/Home/UpdatePreserve.cshtml @@ -2,17 +2,17 @@ ViewData["Title"] = "UpdatePreserve"; }
-

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

+

Редактирование заповедника

-
Животное:
+
Заповедник:
-
Возраст:
+
Стоимость: