This commit is contained in:
Елена Бакальская 2024-05-29 14:01:34 +04:00
commit aa1e0c4e99
7 changed files with 26 additions and 23 deletions

View File

@ -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; }
}
}

View File

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

View File

@ -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;

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -3,16 +3,16 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@if (ViewData.ContainsKey("Title"))
{
<title>
@if (ViewData.ContainsKey("SelectedSiteMenuItem"))
{
@ViewBag.SelectedSiteMenuItem.Item2
}
else if (ViewData.ContainsKey("Title"))
{
@ViewData["Title"]
}
</title>
}
else
{
<title>Боликлиника</title>
}
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/PolyclinicWebView.styles.css" asp-append-version="true" />
@ -52,9 +52,12 @@
</ul>
@if (LoginManager.LogginedUser != null)
{
<form method="post" asp-action="Logout" asp-controller="User">
<div class="d-flex align-items-center">
@Html.RouteLink(LoginManager.LogginedUser.FIO, new { controller = "User", action = "Privacy" }, new { @title = "Личный кабинет" })
<form class="ms-3" method="post" asp-action="Logout" asp-controller="User">
<button class="btn btn-secondary" type="submit">Выйти</button>
</form>
</div>
}
</div>
</div>