пытаюсь создать форму создания рецепта
This commit is contained in:
parent
8c43498f47
commit
cfbf844e40
@ -38,6 +38,11 @@ namespace PolyclinicWebAppSuretor.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult CreateRecipe()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
|
20
Polyclinic/PolyclinicWebAppSuretor/Models/SelectItems.cs
Normal file
20
Polyclinic/PolyclinicWebAppSuretor/Models/SelectItems.cs
Normal file
@ -0,0 +1,20 @@
|
||||
namespace PolyclinicWebAppSuretor.Models
|
||||
{
|
||||
public class SelectItems
|
||||
{
|
||||
public List<string> Items
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
string[] arr = ["1", "2", "3"];
|
||||
|
||||
public void AddItems()
|
||||
{
|
||||
foreach (var item in arr)
|
||||
{
|
||||
Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
@using PolyclinicContracts.ViewModels
|
||||
@model List<RecipeViewModel>
|
||||
@{
|
||||
ViewData["Title"] = "CreateRecipe";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание рецепта</h2>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Количество процедур:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="count" id="count" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Комментарий:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="sum" name="sum" readonly />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Процедуры:</div>
|
||||
<div class="col-8">
|
||||
<select id="procedure" name="procedure" class="form-control">
|
||||
@* @foreach (var sushi in ViewBag.Sushis)
|
||||
{
|
||||
<option value="@sushi.Id">@sushi.SushiName</option>
|
||||
} *@
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Создать" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@ -14,9 +14,13 @@
|
||||
// <h3 class="display-4">Авторизируйтесь</h3>
|
||||
// return;
|
||||
// }
|
||||
|
||||
<p>
|
||||
<a asp-action="CreateRecipe">Создать рецепт</a>
|
||||
<a asp-action="CreateRecipe">
|
||||
Открыть модальное окно
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user