From 58fbf0ac085992ce163a19e2f6ba01076e9d8da0 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: Tue, 28 May 2024 18:46:06 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=BF=D0=B8=D1=81=D0=B0?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D0=BB?= =?UTF-8?q?=D0=B5=D1=80=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=D0=B2=D1=8F=D0=B7=D0=BA=D0=B8=20=D1=81=D0=B8=D0=BC=D0=BF=D1=82?= =?UTF-8?q?=D0=BE=D0=BC=D0=BE=D0=B2=20=D0=BA=20=D0=BB=D0=B5=D0=BA=D0=B0?= =?UTF-8?q?=D1=80=D1=81=D1=82=D0=B2=D0=B0=D0=BC=20=D0=B8=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BE=D1=82=D1=87?= =?UTF-8?q?=D0=B5=D1=82=D0=B0=20=D0=B2=20=D0=B2=D0=BE=D1=80=D0=B4=D0=B5=20?= =?UTF-8?q?=D0=B8=20=D1=8D=D0=BA=D1=81=D0=B5=D0=BB=D0=B5=20,=20=D0=B5?= =?UTF-8?q?=D1=89=D0=B5=20=D1=87=D1=82=D0=BE-=D1=82=D0=BE=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D0=B0=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BD=D0=B5=D0=B3?= =?UTF-8?q?=D0=BE=20(=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=BE=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B4=D0=B8=D0=BE=D0=B1=D0=B0=D1=82=D0=BE=D0=BD=D0=BE=D0=B2=20?= =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=D0=B0=20=D1=87=D0=B5=D0=BA?= =?UTF-8?q?=D0=B1=D0=BE=D0=BA=D1=81=D1=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractSaveToWordCoursesByProcedures.cs | 5 --- .../ISuretorReportLogic.cs | 2 +- .../Controllers/HomeController.cs | 12 ++++-- .../Models/AddSymptomToMedicamentModel.cs | 10 +++++ .../Views/Home/AddSymptomToMedicament.cshtml | 12 ++++-- .../Views/Home/CreateRecipe.cshtml | 37 ++++++++++--------- .../Views/Home/ListCoursesByProcedures.cshtml | 10 ++--- 7 files changed, 53 insertions(+), 35 deletions(-) create mode 100644 Polyclinic/PolyclinicWebAppSuretor/Models/AddSymptomToMedicamentModel.cs diff --git a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractSaveToWordCoursesByProcedures.cs b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractSaveToWordCoursesByProcedures.cs index c03f470..ae6a525 100644 --- a/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractSaveToWordCoursesByProcedures.cs +++ b/Polyclinic/PolyclinicBusinessLogic/OfficePackage/AbstractSaveToWordCoursesByProcedures.cs @@ -1,10 +1,5 @@ using PolyclinicBusinessLogic.OfficePackage.HelperEnums; using PolyclinicBusinessLogic.OfficePackage.HelperModels.Word; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace PolyclinicBusinessLogic.OfficePackage { diff --git a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/ISuretorReportLogic.cs b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/ISuretorReportLogic.cs index 5ca5cd8..77a2835 100644 --- a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/ISuretorReportLogic.cs +++ b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/ISuretorReportLogic.cs @@ -12,7 +12,7 @@ namespace PolyclinicContracts.BusinessLogicsContracts public interface ISuretorReportLogic { /// - /// Получение списка компонент с указанием, в каких изделиях используются + /// Получение данных (списка) курсов - ну он получается один по выбранным процедурам /// /// List GetProcedureCourses(ProcedureSearchModel model); diff --git a/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs b/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs index f57f4b4..838c470 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs +++ b/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs @@ -276,12 +276,18 @@ namespace PolyclinicWebAppSuretor.Controllers public IActionResult ListCoursesByProcedures() { - return View(); + List procedures = _procedureLogic.ReadList(null); + return View(procedures); } - public IActionResult AddSymptomToMedicament() + public IActionResult AddSymptomToMedicament(AddSymptomToMedicamentModel model) { - return View(); + model = new() + { + Medicaments = _medicamentLogic.ReadList(null), + Symptoms = _symptomLogic.ReadList(null) + }; + return View(model); } [HttpGet] diff --git a/Polyclinic/PolyclinicWebAppSuretor/Models/AddSymptomToMedicamentModel.cs b/Polyclinic/PolyclinicWebAppSuretor/Models/AddSymptomToMedicamentModel.cs new file mode 100644 index 0000000..bdc6f29 --- /dev/null +++ b/Polyclinic/PolyclinicWebAppSuretor/Models/AddSymptomToMedicamentModel.cs @@ -0,0 +1,10 @@ +using PolyclinicContracts.ViewModels; + +namespace PolyclinicWebAppSuretor.Models +{ + public class AddSymptomToMedicamentModel + { + public List Medicaments { get; set; } = new(); + public List Symptoms { get; set; } = new(); + } +} diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/AddSymptomToMedicament.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/AddSymptomToMedicament.cshtml index eb6885f..1a2b363 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/AddSymptomToMedicament.cshtml +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/AddSymptomToMedicament.cshtml @@ -1,4 +1,6 @@ @using PolyclinicContracts.ViewModels +@model AddSymptomToMedicamentModel + @{ ViewData["Title"] = "AddSymptomToMedicament"; } @@ -7,12 +9,13 @@
Симптом:
+ @@ -21,12 +24,13 @@
Лекарство:
+ diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml index 6185efa..6df9e70 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml @@ -38,27 +38,30 @@
-
+

Выбор процедуры:

-
    - @foreach (var item in Model.Procedures) - { -
  1. - @if (item.IsChecked) - { - - } - else - { - - } - -
  2. - } -
+
+
    + @foreach (var item in Model.Procedures) + { +
  1. + @if (item.IsChecked) + { + + } + else + { + + } + +
  2. + } +
+
+
diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/ListCoursesByProcedures.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/ListCoursesByProcedures.cshtml index 5d23885..bffad41 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/ListCoursesByProcedures.cshtml +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/ListCoursesByProcedures.cshtml @@ -1,4 +1,5 @@ @using PolyclinicContracts.ViewModels +@model List @{ ViewData["Title"] = "ListCoursesByProcedures"; } @@ -10,17 +11,16 @@

- Выберите процедуру из списка + Выберите процедуру/ы из списка

    @{ - int count = 20; - for (int i = 1; i <= count; i++) + foreach (var item in Model) {
  • - - + +
  • } }