From ea7b4f252b8488af09cc9acc44e97e8bc1967e0a Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Wed, 29 May 2024 12:55:40 +0400 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BE=D0=B1=D1=89=D0=B8=D0=B9=20=D1=88=D0=B0=D0=B1?= =?UTF-8?q?=D0=BB=D0=BE=D0=BD,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=84=D0=B8=D0=BE=20=D0=B7=D0=B0=D0=BB=D0=BE=D0=B3?= =?UTF-8?q?=D0=B8=D0=BD=D0=B8=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Shared/_Layout.cshtml | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Polyclinic/PolyclinicWebAppImplementer/Views/Shared/_Layout.cshtml b/Polyclinic/PolyclinicWebAppImplementer/Views/Shared/_Layout.cshtml index fa8f255..3550179 100644 --- a/Polyclinic/PolyclinicWebAppImplementer/Views/Shared/_Layout.cshtml +++ b/Polyclinic/PolyclinicWebAppImplementer/Views/Shared/_Layout.cshtml @@ -3,16 +3,16 @@ - - @if (ViewData.ContainsKey("SelectedSiteMenuItem")) - { - @ViewBag.SelectedSiteMenuItem.Item2 - } - else if (ViewData.ContainsKey("Title")) - { + @if (ViewData.ContainsKey("Title")) + { + <title> @ViewData["Title"] - } - + + } + else + { + Боликлиника + } @@ -50,11 +50,14 @@ } } - @if(LoginManager.LogginedUser != null) + @if (LoginManager.LogginedUser != null) { -
- -
+
+ @Html.RouteLink(LoginManager.LogginedUser.FIO, new { controller = "User", action = "Privacy" }, new { @title = "Личный кабинет" }) +
+ +
+
} From d1fc181b082e38f3e494a0f7b127e476a0decb20 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Wed, 29 May 2024 13:55:20 +0400 Subject: [PATCH 2/2] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D1=80=D0=B5=D1=88=D0=B8?= =?UTF-8?q?=D0=BB=20null=20=D0=B2=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D1=8F?= =?UTF-8?q?=D1=85=20=D0=B1=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PolyclinicDatabaseImplement/Models/CourseDiagnose.cs | 4 ++-- Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs | 2 +- Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs | 2 +- .../PolyclinicDatabaseImplement/Models/RecipeProcedure.cs | 4 ++-- .../PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs | 4 ++-- .../PolyclinicDatabaseImplement/Models/SymptomRecipe.cs | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/CourseDiagnose.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/CourseDiagnose.cs index 5c8809f..36db203 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/CourseDiagnose.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/CourseDiagnose.cs @@ -9,7 +9,7 @@ namespace PolyclinicDatabaseImplement.Models public int CourseId { get; set; } [Required] public int DiagnoseId { get; set; } - public virtual Course Course { get; set; } = new(); - public virtual Diagnose Diagnose { get; set; } = new(); + public virtual Course? Course { get; set; } + public virtual Diagnose? Diagnose { get; set; } } } diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs index 42cda37..7848b38 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs @@ -17,7 +17,7 @@ namespace PolyclinicDatabaseImplement.Models public DateTime DateStartDiagnose { get; set; } = DateTime.Now; public DateTime? DateStopDiagnose { get; set; } public int Id { get; set; } - public virtual User User { get; set; } = new(); + public virtual User? User { get; set; } public static Diagnose? Create(DiagnoseBindingModel? model) { diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs index f9dfde2..a97c9c8 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs @@ -19,7 +19,7 @@ namespace PolyclinicDatabaseImplement.Models [Required] public DateTime DateStartProcedure { get; set; } = DateTime.Now; public DateTime? DateStopProcedure { get; set; } - public virtual User User { get; set; } = new(); + public virtual User? User { get; set; } public string? Comment { get; set; } = string.Empty; diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/RecipeProcedure.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/RecipeProcedure.cs index 86b5369..dee6a7d 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/RecipeProcedure.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/RecipeProcedure.cs @@ -9,7 +9,7 @@ namespace PolyclinicDatabaseImplement.Models public int ProcedureId { get; set; } [Required] public int RecipeId { get; set; } - public virtual Procedure Procedure { get; set; } = new(); - public virtual Recipe Recipe { get; set; } = new(); + public virtual Procedure? Procedure { get; set; } + public virtual Recipe? Recipe { get; set; } } } diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs index 7d8a399..8d3566b 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs @@ -9,7 +9,7 @@ namespace PolyclinicDatabaseImplement.Models public int SymptomId { get; set; } [Required] public int DiagnoseId { get; set; } - public virtual Symptom Symptom { get; set; } = new(); - public virtual Diagnose Diagnose { get; set; } = new(); + public virtual Symptom? Symptom { get; set; } + public virtual Diagnose? Diagnose { get; set; } } } diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs index 032ac33..4f758d0 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs @@ -9,7 +9,7 @@ namespace PolyclinicDatabaseImplement.Models public int SymptomId { get; set; } [Required] public int RecipeId { get; set; } - public virtual Symptom Symptom { get; set; } = new(); - public virtual Recipe Recipe { get; set; } = new(); + public virtual Symptom? Symptom { get; set; } + public virtual Recipe? Recipe { get; set; } } }