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) {