From c748d3328c8c457e666924fc3caf400717ba476b Mon Sep 17 00:00:00 2001 From: ValAnn Date: Wed, 1 May 2024 11:45:31 +0400 Subject: [PATCH] =?UTF-8?q?=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D1=81=D1=82=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=B2=20=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B8=20=D0=B4=D0=BE=D0=BA=D1=82=D0=BE=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HomeController.cs | 10 ++- .../Views/Home/AddProcedureToPatient.cshtml | 2 +- .../Views/Home/CreateDisease.cshtml | 48 ++++++------ .../Views/Home/DeleteDisease.cshtml | 2 +- .../Views/Home/DeletePatient.cshtml | 40 ++++------ .../Views/Home/DeleteRecipe.cshtml | 40 ++++------ .../HospitalDoctorApp/Views/Home/Index.cshtml | 2 +- .../Views/Home/IndexDiseases.cshtml | 6 +- .../Views/Home/IndexRecipes.cshtml | 8 +- .../Views/Home/LinkPatientAndProcedure.cshtml | 52 +++++++------ .../Views/Home/UpdateDisease.cshtml | 2 +- .../Views/Home/UpdatePatient.cshtml | 78 +++++++++++++------ .../Views/Home/UpdateRecipe.cshtml | 53 +++++++------ 13 files changed, 184 insertions(+), 159 deletions(-) diff --git a/Hospital/HospitalDoctorApp/Controllers/HomeController.cs b/Hospital/HospitalDoctorApp/Controllers/HomeController.cs index 224d186..2e02da1 100644 --- a/Hospital/HospitalDoctorApp/Controllers/HomeController.cs +++ b/Hospital/HospitalDoctorApp/Controllers/HomeController.cs @@ -156,7 +156,8 @@ View(APIClient.GetRequest>($"api/disease/getdiseases?dise } public IActionResult CreateRecipe() { - if (APIClient.Doctor == null) + ViewBag.Recipes = APIClient.GetRequest>("api/disease/getdiseaselist"); + if (APIClient.Doctor == null) { return Redirect("~/Home/"); } @@ -164,8 +165,11 @@ View(APIClient.GetRequest>($"api/disease/getdiseases?dise } public IActionResult CreateDisease() { - ViewBag.Recipes = APIClient.GetRequest>("api/recipe/getrecipelist"); - return View(); + if (APIClient.Doctor == null) + { + return Redirect("~/Home/"); + } + return View(); return View(); } [HttpPost] diff --git a/Hospital/HospitalDoctorApp/Views/Home/AddProcedureToPatient.cshtml b/Hospital/HospitalDoctorApp/Views/Home/AddProcedureToPatient.cshtml index 384b77e..59ea11d 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/AddProcedureToPatient.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/AddProcedureToPatient.cshtml @@ -8,7 +8,7 @@
- + - - - +
+

Создание болезни

+
-
- - -
- -
-
-
-
+ +
+
Название:
+
+ +
+
+
+
Описание:
+
+ +
+
+ +
+
+
+ +
+
+ diff --git a/Hospital/HospitalDoctorApp/Views/Home/DeleteDisease.cshtml b/Hospital/HospitalDoctorApp/Views/Home/DeleteDisease.cshtml index 384b77e..59ea11d 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/DeleteDisease.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/DeleteDisease.cshtml @@ -8,7 +8,7 @@
- + - - - +
+

Удаление пациента

+
-
- - -
- -
-
-
-
- +
+
Пациенты:
+
+ +
+
+
+
+
+
+ \ No newline at end of file diff --git a/Hospital/HospitalDoctorApp/Views/Home/DeleteRecipe.cshtml b/Hospital/HospitalDoctorApp/Views/Home/DeleteRecipe.cshtml index 384b77e..2e8a6d4 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/DeleteRecipe.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/DeleteRecipe.cshtml @@ -1,28 +1,18 @@ @{ - ViewData["Title"] = "CreateDisease"; + ViewData["Title"] = "DeleteRecipe"; } - - - - - +
+

Удаление Рецепта

+
-
- - -
- -
-
-
-
-
+
+
Рецепт:
+
+ +
+
+
+
+
+
+ \ No newline at end of file diff --git a/Hospital/HospitalDoctorApp/Views/Home/Index.cshtml b/Hospital/HospitalDoctorApp/Views/Home/Index.cshtml index 3d365eb..27c17fe 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/Index.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/Index.cshtml @@ -20,7 +20,7 @@

Редактировать пациента Удалить пациента - Связать пацииента и процедуру + Связать пацииента и процедуру

Создать пациента diff --git a/Hospital/HospitalDoctorApp/Views/Home/IndexDiseases.cshtml b/Hospital/HospitalDoctorApp/Views/Home/IndexDiseases.cshtml index 093da75..9575027 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/IndexDiseases.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/IndexDiseases.cshtml @@ -18,11 +18,11 @@ return; }

- Редактировать болезнь - Удалить болезнь + Редактировать болезнь + Удалить болезнь

- Создать болезнь + Создать болезнь

diff --git a/Hospital/HospitalDoctorApp/Views/Home/IndexRecipes.cshtml b/Hospital/HospitalDoctorApp/Views/Home/IndexRecipes.cshtml index ab01bce..f53c755 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/IndexRecipes.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/IndexRecipes.cshtml @@ -18,12 +18,12 @@ return; }

- Редактировать рецепт - Удалить рецепт - Связать рецепт и пациента + Редактировать рецепт + Удалить рецепт + Связать рецепт и пациента

- Создать рецепт + Создать рецепт

diff --git a/Hospital/HospitalDoctorApp/Views/Home/LinkPatientAndProcedure.cshtml b/Hospital/HospitalDoctorApp/Views/Home/LinkPatientAndProcedure.cshtml index 384b77e..c67db16 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/LinkPatientAndProcedure.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/LinkPatientAndProcedure.cshtml @@ -1,28 +1,32 @@ -@{ - ViewData["Title"] = "CreateDisease"; +@using HospitalContracts.ViewModels; + +@{ + ViewData["Title"] = "PatientRecipes"; } - - - - +
+

Связывание рецепта и пациента

+
-
- - -
- -
-
-
-
+
+
Рецепт:
+
+ +
+
+ +
+
Пациенты:
+
+ +
+
+
+
+
+
+ + diff --git a/Hospital/HospitalDoctorApp/Views/Home/UpdateDisease.cshtml b/Hospital/HospitalDoctorApp/Views/Home/UpdateDisease.cshtml index 384b77e..59ea11d 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/UpdateDisease.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/UpdateDisease.cshtml @@ -8,7 +8,7 @@
- + - - - +
+

Редактирование пациента

+
-
- - -
- -
-
-
-
+
+
Пациент:
+
+ +
+ +
+
+
ФИО:
+
+
+
+
Дата рождения:
+
+ +
+
+ + +
+
+
+
+ +@section Scripts +{ + +} \ No newline at end of file diff --git a/Hospital/HospitalDoctorApp/Views/Home/UpdateRecipe.cshtml b/Hospital/HospitalDoctorApp/Views/Home/UpdateRecipe.cshtml index 384b77e..27c9076 100644 --- a/Hospital/HospitalDoctorApp/Views/Home/UpdateRecipe.cshtml +++ b/Hospital/HospitalDoctorApp/Views/Home/UpdateRecipe.cshtml @@ -1,28 +1,33 @@ -@{ - ViewData["Title"] = "CreateDisease"; +@using HospitalContracts.ViewModels; + +@{ + ViewData["Title"] = "UpdateRecipe"; } - - - - +
+

Редактирование рецепта

+
-
- - -
- -
-
-
-
+
+
Рецепт:
+
+ +
+ +
+
+
Название:
+
+
+
+
Описание:
+
+
+ + +
+
+
+
+