что-то подредактировала в процедурах и рецептах

This commit is contained in:
Елена Бакальская 2024-05-28 15:03:28 +04:00
parent f6c52a08ad
commit 549379a588
4 changed files with 5 additions and 10 deletions

View File

@ -1,10 +1,4 @@
using System; namespace PolyclinicContracts.BindingModels
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BindingModels
{ {
public class ReportBindingModel public class ReportBindingModel
{ {

View File

@ -84,6 +84,7 @@ namespace PolyclinicDatabaseImplement.Models
Procedure = Procedure, Procedure = Procedure,
Recipe = database.Recipes.First(x => x.Id == pc.Key) Recipe = database.Recipes.First(x => x.Id == pc.Key)
}); });
database.SaveChanges();
} }
_recipeProcedures = null; _recipeProcedures = null;
} }

View File

@ -55,7 +55,7 @@ namespace PolyclinicWebAppSuretor.Controllers
public IActionResult CreateRecipe(RecipeViewModel model) public IActionResult CreateRecipe(RecipeViewModel model)
{ {
ViewBag.Procedures = _procedureLogic.ReadList(null); ViewBag.Procedures = _procedureLogic.ReadList(null);
ViewBag.RecipeProcedures = _recipeLogic. //ViewBag.RecipeProcedures = _recipeLogic.
if (HttpContext.Request.Method == "GET") if (HttpContext.Request.Method == "GET")
{ {
ViewData["Title"] = "Íîâûé ðåöåïò"; ViewData["Title"] = "Íîâûé ðåöåïò";

View File

@ -32,7 +32,7 @@
<h3 class="col-3"> <h3 class="col-3">
Выбор процедуры: Выбор процедуры:
</h3> </h3>
<select id="procedureId" name="procedureId" style="width: 45vh" multiple> <select id="procedureId" name="procedureId" style="width: 45vh">
<option value="">Выберите процедуру/ы</option> <option value="">Выберите процедуру/ы</option>
@foreach (var item in ViewBag.Procedures) @foreach (var item in ViewBag.Procedures)
{ {
@ -52,7 +52,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach (var item in ViewBag.RecipeProcedures) @foreach (var item in ViewBag.Procedures)
{ {
<tr> <tr>
<td>Процедура № @item.Id @item.Name</td> <td>Процедура № @item.Id @item.Name</td>