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