From 68c704f47c39b423476f3b6e38c60c7abb538b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=91=D0=B0=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D1=81=D0=BA=D0=B0=D1=8F?= Date: Wed, 29 May 2024 21:42:34 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D1=83=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2=D0=B8=D0=BB=D0=B0=20=D0=BC=D0=B8=D0=B3?= =?UTF-8?q?=D1=80=D0=B0=20=D0=B4=D0=BE=D0=BA,=20=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=B0=D0=B5=D1=82=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D0=BF=D0=B4=D1=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PolyclinicBusinessLogic.csproj | 2 +- .../PolyclinicWebAppSuretor/Controllers/HomeController.cs | 4 +++- .../Views/Home/ProceduresReport.cshtml | 8 +------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Polyclinic/PolyclinicBusinessLogic/PolyclinicBusinessLogic.csproj b/Polyclinic/PolyclinicBusinessLogic/PolyclinicBusinessLogic.csproj index 968b6ae..fa12928 100644 --- a/Polyclinic/PolyclinicBusinessLogic/PolyclinicBusinessLogic.csproj +++ b/Polyclinic/PolyclinicBusinessLogic/PolyclinicBusinessLogic.csproj @@ -9,7 +9,7 @@ - + diff --git a/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs b/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs index af24ea7..1ae776e 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs +++ b/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs @@ -425,8 +425,10 @@ namespace PolyclinicWebAppSuretor.Controllers _suretorReportLogic.SaveProceduresToPdfFile(reportBindingModel); // Чтение сгенерированного файла - var fileBytes = System.IO.File.ReadAllBytes(reportBindingModel.FileName); + //var fileBytes = System.IO.File.ReadAllBytes(reportBindingModel.FileName); var fileName = "ProceduresReport.pdf"; + var filePath = Path.Combine(Directory.GetCurrentDirectory(), fileName); + byte[] fileBytes = System.IO.File.ReadAllBytes(filePath); // Возвращаем файл в виде скачиваемого контента return File(fileBytes, "application/pdf", fileName); diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/ProceduresReport.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/ProceduresReport.cshtml index 9f4a5ca..f1c29f1 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/ProceduresReport.cshtml +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/ProceduresReport.cshtml @@ -1,7 +1,7 @@ п»ї@using PolyclinicContracts.ViewModels @model List @{ - ViewData["Title"] = "ProceduresReport"; + ViewData["Title"] = "Отчет РїРѕ процедурам"; }
@@ -53,13 +53,9 @@ @item.DateStopProcedure?.ToShortDateString() - - @* @string.Join("
", item.MedicamentSymptom.Select(ms => ms.medicamentName)) - @string.Join("
", item.MedicamentSymptom.Select(ms => ms.symptomName)) *@ @foreach (var ms in item.MedicamentSymptom) { - @@ -68,9 +64,7 @@ @ms.medicamentName @ms.symptomName - } - }