From 171ca6d819353194418a9d5e1f1088506d51239e 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: Mon, 27 May 2024 21:53:53 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=B8=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BD=D0=B0?= =?UTF-8?q?=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=81=D0=B8=D0=BC=D0=BF?= =?UTF-8?q?=D1=82=D0=BE=D0=BC=D0=B0=20=D0=B8=20=D0=BF=D1=80=D0=BE=D1=86?= =?UTF-8?q?=D0=B5=D0=B4=D1=83=D1=80=D1=8B=20=D0=B2=D0=BE=20=D0=B2=D1=8C?= =?UTF-8?q?=D1=8E=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/MedicamentViewModel.cs | 10 ++++ .../ViewModels/RecipeViewModel.cs | 2 + .../Models/Medicament.cs | 4 +- .../Views/Home/Medicaments.cshtml | 53 +++++++++---------- .../Views/Home/Procedures.cshtml | 2 - 5 files changed, 40 insertions(+), 31 deletions(-) diff --git a/Polyclinic/PolyclinicContracts/ViewModels/MedicamentViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/MedicamentViewModel.cs index 516bfa1..b9b9fc6 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/MedicamentViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/MedicamentViewModel.cs @@ -8,9 +8,19 @@ namespace PolyclinicContracts.ViewModels public int Id { get; set; } public int ProcedureId { get; set; } public int? SymptomId { get; set; } + [DisplayName("Название медикамента")] public string Name { get; set; } = string.Empty; + + [DisplayName("Комментарий")] public string Comment { get; set; } = string.Empty; + + + [DisplayName("Название симптома")] + public string SymptomName { get; set; } = string.Empty; + + [DisplayName("Название процедуры")] + public string ProcedureName { get; set; } = string.Empty; } } diff --git a/Polyclinic/PolyclinicContracts/ViewModels/RecipeViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/RecipeViewModel.cs index cd8a8b2..11d0878 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/RecipeViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/RecipeViewModel.cs @@ -12,6 +12,8 @@ namespace PolyclinicContracts.ViewModels [DisplayName("Комментарий")] public string Comment { get; set; } = string.Empty; + + [DisplayName("Номер курса")] public int? CourseId { get; set; } public Dictionary RecipeProcedures { get; } = new(); } diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/Medicament.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/Medicament.cs index a221a43..37609cf 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/Medicament.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/Medicament.cs @@ -48,7 +48,9 @@ namespace PolyclinicDatabaseImplement.Models Name = Name, Comment = Comment, ProcedureId = ProcedureId, - SymptomId = Symptom?.Id ?? null + SymptomId = Symptom?.Id ?? null, + SymptomName = Symptom?.Name ?? string.Empty, + ProcedureName = Procedure?.Name ?? string.Empty, }; } } diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/Medicaments.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/Medicaments.cshtml index 1217c28..bbb787d 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/Medicaments.cshtml +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/Medicaments.cshtml @@ -45,35 +45,32 @@ - - 1 - - - Фенибут - - - Сопли до колен - - - 3 - - - При особом неврозе употребляйте каждый день и спина не будет болеть - - - - - + @foreach (var item in Model) + { + @item.Id + @item.Name + @item.SymptomId. + + 3 + + + При особом неврозе употребляйте каждый день и спина не будет болеть + + + + + + + + + + + + + - - - - - - - - - + + } } diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/Procedures.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/Procedures.cshtml index 7e0b10f..609bb50 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/Procedures.cshtml +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/Procedures.cshtml @@ -32,8 +32,6 @@ - - @foreach (var item in Model) {