Реализовал форму отчета лекарств по болезням

This commit is contained in:
Никита Потапов 2024-05-01 00:16:50 +04:00
parent d1950df778
commit ec7b0ce804
3 changed files with 56 additions and 1 deletions

View File

@ -104,6 +104,20 @@ namespace PolyclinicWebAppImplementer.Controllers
}
}
[HttpGet]
[HttpPost]
public IActionResult GetMedicamentsByDiagnoses()
{
if (HttpContext.Request.Method == "POST")
{
return View();
}
else
{
return View();
}
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{

View File

@ -13,10 +13,11 @@
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 (string Url, string Title) GetMedicamentsByDiagnoses = ("GetMedicamentsByDiagnoses", "Лекарства по болезням");
public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)>
{
Index, Courses, Diagnoses, Symptomes, Login, Register, AddRecipeToCourse
Index, Courses, Diagnoses, Symptomes, Login, Register, AddRecipeToCourse, GetMedicamentsByDiagnoses
};
}
}

View File

@ -0,0 +1,40 @@
@{
ViewBag.SelectedSiteMenuItem = SiteMenuItems.GetMedicamentsByDiagnoses;
}
<h4>Список лекарств по болезням</h4>
<form class="d-flex flex-column mt-2">
<h5>Выберите болезни</h5>
<div class="mb-3 overflow-auto" style="max-width: 500px; max-height: 300px;">
<ul>
@{
for(int i = 0; i < 10; i++)
{
<li class="d-flex mb-2">
<input class="me-2" name="diagnose-@i" type="checkbox" id="diagnose-@i"/>
<label for="diagnose-@i">Название болезни @i</label>
</li>
}
}
</ul>
</div>
<fieldset class="mb-3">
<h5>Укажите формат файла</h5>
<div class="d-flex">
<div class="d-flex me-3">
<input class="me-2" type="radio" name="fileFormat" value="docx" id="radio-docx"/>
<label for="radio-docx">DOCX</label>
</div>
<div class="d-flex me-3">
<input class="me-2" type="radio" name="fileFormat" value="xlsx" id="radio-xlsx" />
<label for="radio-xlsx">XLSX</label>
</div>
</div>
</fieldset>
<div class="mb-3">
<h5>Укажите название файла</h5>
<input type="text" id="fileName"/>
</div>
<button class="btn btn-primary col-2" type="submit">
Скачать отчет
</button>
</form>