ура я починила эти.. рецепты
окончательно! (надеюсь :_) )
This commit is contained in:
parent
4ac7886a74
commit
3bfc9cf130
@ -16,7 +16,7 @@ namespace PolyclinicDatabaseImplement.Models
|
|||||||
|
|
||||||
public string? Comment { get; set; } = string.Empty;
|
public string? Comment { get; set; } = string.Empty;
|
||||||
public int? CourseId { get; set; }
|
public int? CourseId { get; set; }
|
||||||
public virtual Course Course { get; set; } = new();
|
public virtual Course? Course { get; set; }
|
||||||
|
|
||||||
private Dictionary<int, IProcedureModel>? _recipeProcedures = null;
|
private Dictionary<int, IProcedureModel>? _recipeProcedures = null;
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ namespace PolyclinicDatabaseImplement.Models
|
|||||||
Id = Id,
|
Id = Id,
|
||||||
ProceduresCount = ProceduresCount,
|
ProceduresCount = ProceduresCount,
|
||||||
Comment = Comment,
|
Comment = Comment,
|
||||||
CourseId = Course?.Id ?? null,
|
CourseId = CourseId ?? null,
|
||||||
};
|
};
|
||||||
|
|
||||||
public void UpdateProcedures(PolyclinicDatabase database, RecipeBindingModel bindingModel)
|
public void UpdateProcedures(PolyclinicDatabase database, RecipeBindingModel bindingModel)
|
||||||
|
@ -48,6 +48,11 @@ namespace PolyclinicWebAppSuretor.Controllers
|
|||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// RECIPES
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
public IActionResult Recipes()
|
public IActionResult Recipes()
|
||||||
{
|
{
|
||||||
List<RecipeViewModel> recipes = _recipeLogic.ReadList(null);
|
List<RecipeViewModel> recipes = _recipeLogic.ReadList(null);
|
||||||
@ -62,7 +67,7 @@ namespace PolyclinicWebAppSuretor.Controllers
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IActionResult CreateRecipe(RecipeModel model, int[] selectedProcedures)
|
public IActionResult CreateRecipe(RecipeModel model, int[] selectedProcedures)
|
||||||
{
|
{
|
||||||
ViewBag.Courses = _courseLogic.ReadList(null);
|
ViewBag.Courses = _courseLogic.ReadList();
|
||||||
if (HttpContext.Request.Method == "GET")
|
if (HttpContext.Request.Method == "GET")
|
||||||
{
|
{
|
||||||
ViewData["Title"] = "Íîâûé ðåöåïò";
|
ViewData["Title"] = "Íîâûé ðåöåïò";
|
||||||
@ -138,6 +143,11 @@ namespace PolyclinicWebAppSuretor.Controllers
|
|||||||
return RedirectToAction("Recipes");
|
return RedirectToAction("Recipes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MEDICAMENTS
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
public IActionResult Medicaments()
|
public IActionResult Medicaments()
|
||||||
{
|
{
|
||||||
List<MedicamentViewModel> medicaments = _medicamentLogic.ReadList(null);
|
List<MedicamentViewModel> medicaments = _medicamentLogic.ReadList(null);
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<h3 class="col-3">
|
<h3 class="col-3">
|
||||||
Курс (номер):
|
Курс (номер):
|
||||||
</h3>
|
</h3>
|
||||||
<select style="width: 45vh" id="courseId" name="courseId" asp-for="RecipeViewModel.CourseId">
|
<select style="width: 45vh" asp-for="RecipeViewModel.CourseId">
|
||||||
<option>Выберите номер курса</option>
|
<option>Выберите номер курса</option>
|
||||||
@foreach (var course in ViewBag.Courses)
|
@foreach (var course in ViewBag.Courses)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user