From 549379a5882288196f5367cac9b943fbf1fe6a1b 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: Tue, 28 May 2024 15:03:28 +0400 Subject: [PATCH] =?UTF-8?q?=D1=87=D1=82=D0=BE-=D1=82=D0=BE=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B2=20=D0=BF=D1=80=D0=BE=D1=86?= =?UTF-8?q?=D0=B5=D0=B4=D1=83=D1=80=D0=B0=D1=85=20=D0=B8=20=D1=80=D0=B5?= =?UTF-8?q?=D1=86=D0=B5=D0=BF=D1=82=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/ReportBindingModel.cs | 8 +------- Polyclinic/PolyclinicDatabaseImplement/Models/Recipe.cs | 1 + .../PolyclinicWebAppSuretor/Controllers/HomeController.cs | 2 +- .../Views/Home/CreateRecipe.cshtml | 4 ++-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Polyclinic/PolyclinicContracts/BindingModels/ReportBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/ReportBindingModel.cs index 76607a0..e5f4907 100644 --- a/Polyclinic/PolyclinicContracts/BindingModels/ReportBindingModel.cs +++ b/Polyclinic/PolyclinicContracts/BindingModels/ReportBindingModel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace PolyclinicContracts.BindingModels +namespace PolyclinicContracts.BindingModels { public class ReportBindingModel { diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/Recipe.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/Recipe.cs index d8b2ffc..6bb6636 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/Recipe.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/Recipe.cs @@ -84,6 +84,7 @@ namespace PolyclinicDatabaseImplement.Models Procedure = Procedure, Recipe = database.Recipes.First(x => x.Id == pc.Key) }); + database.SaveChanges(); } _recipeProcedures = null; } diff --git a/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs b/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs index 60fe2f9..c695373 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs +++ b/Polyclinic/PolyclinicWebAppSuretor/Controllers/HomeController.cs @@ -55,7 +55,7 @@ namespace PolyclinicWebAppSuretor.Controllers public IActionResult CreateRecipe(RecipeViewModel model) { ViewBag.Procedures = _procedureLogic.ReadList(null); - ViewBag.RecipeProcedures = _recipeLogic. + //ViewBag.RecipeProcedures = _recipeLogic. if (HttpContext.Request.Method == "GET") { ViewData["Title"] = "Íîâûé ðåöåïò"; diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml index 69434ab..d7fd636 100644 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateRecipe.cshtml @@ -32,7 +32,7 @@

Выбор процедуры:

- @foreach (var item in ViewBag.Procedures) { @@ -52,7 +52,7 @@ - @foreach (var item in ViewBag.RecipeProcedures) + @foreach (var item in ViewBag.Procedures) { Процедура № @item.Id @item.Name