Реализовал форму привязки рецепта к курсу
This commit is contained in:
parent
bb331000f6
commit
f807bea098
@ -90,6 +90,20 @@ namespace PolyclinicWebAppImplementer.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[HttpPost]
|
||||
public IActionResult AddRecipeToCourse()
|
||||
{
|
||||
if (HttpContext.Request.Method == "POST")
|
||||
{
|
||||
return Redirect("~/");
|
||||
}
|
||||
else
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
|
@ -12,10 +12,11 @@
|
||||
public static (string Url, string Title) Login = ("Login", "Вход");
|
||||
public static (string Url, string Title) Register = ("Register", "Регистрация");
|
||||
public static (string Url, string Title) Privacy = ("Privacy", "Политика приватности");
|
||||
public static (string Url, string Title) AddRecipeToCourse = ("AddRecipeToCourse", "Привязка рецепта");
|
||||
|
||||
public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)>
|
||||
{
|
||||
Index, Courses, Diagnoses, Symptomes, Login, Register
|
||||
Index, Courses, Diagnoses, Symptomes, Login, Register, AddRecipeToCourse
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,41 @@
|
||||
@{
|
||||
ViewBag.SelectedSiteMenuItem = SiteMenuItems.Course;
|
||||
}
|
||||
<h4>Привязка рецепта к курсу</h4>
|
||||
<form id="addrecipetocourse" method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="col-3 d-flex align-content-center">
|
||||
<h5 class="me-2">Рецепт</h5>
|
||||
<select id="recipeId" name="recipeId" class="me-2">
|
||||
<option value="">Выберите рецепт</option>
|
||||
@{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
<option value="@i">Рецепт оууеее @i</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-3 d-flex align-content-center">
|
||||
<h5 class="me-2">Курс</h5>
|
||||
<select id="courseId" name="courseId" class="me-2">
|
||||
<option value="">Выберите курс</option>
|
||||
@{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
<option value="@i">Какой то курс @i</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-3">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
Привязать
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
Loading…
Reference in New Issue
Block a user