редактриование представлений в приложении доктора
This commit is contained in:
parent
57d2d06843
commit
c748d3328c
@ -156,7 +156,8 @@ View(APIClient.GetRequest<List<DiseaseViewModel>>($"api/disease/getdiseases?dise
|
||||
}
|
||||
public IActionResult CreateRecipe()
|
||||
{
|
||||
if (APIClient.Doctor == null)
|
||||
ViewBag.Recipes = APIClient.GetRequest<List<RecipeViewModel>>("api/disease/getdiseaselist");
|
||||
if (APIClient.Doctor == null)
|
||||
{
|
||||
return Redirect("~/Home/");
|
||||
}
|
||||
@ -164,8 +165,11 @@ View(APIClient.GetRequest<List<DiseaseViewModel>>($"api/disease/getdiseases?dise
|
||||
}
|
||||
public IActionResult CreateDisease()
|
||||
{
|
||||
ViewBag.Recipes = APIClient.GetRequest<List<RecipeViewModel>>("api/recipe/getrecipelist");
|
||||
return View();
|
||||
if (APIClient.Doctor == null)
|
||||
{
|
||||
return Redirect("~/Home/");
|
||||
}
|
||||
return View(); return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название болезни</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
|
@ -1,28 +1,30 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateDisease";
|
||||
ViewData["Title"] = "CreateDisease";
|
||||
}
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
|
||||
</head>
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создание болезни</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-form-email u-form-group u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
|
||||
<input type="text"
|
||||
placeholder="Введите описание болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-align-right u-form-group u-form-submit u-label-top">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Название:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Описание:</div>
|
||||
<div class="col-8">
|
||||
<input type="text" name="description" />
|
||||
</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>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название болезни</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
|
@ -1,28 +1,18 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateDisease";
|
||||
ViewData["Title"] = "DeletePatient";
|
||||
}
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
|
||||
</head>
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление пациента</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-form-email u-form-group u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
|
||||
<input type="text"
|
||||
placeholder="Введите описание болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-align-right u-form-group u-form-submit u-label-top">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-4">Пациенты:</div>
|
||||
<div class="col-8">
|
||||
<select id="pacient" name="pacient" class="form-control" asp-items="@(new SelectList(@ViewBag.Pacients, "Id", "FIO"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-8"><input type="submit" value="Удалить" class="btn btn-danger" /></div>
|
||||
</div>
|
||||
</form>
|
@ -1,28 +1,18 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateDisease";
|
||||
ViewData["Title"] = "DeleteRecipe";
|
||||
}
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
|
||||
</head>
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Удаление Рецепта</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-form-email u-form-group u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
|
||||
<input type="text"
|
||||
placeholder="Введите описание болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-align-right u-form-group u-form-submit u-label-top">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-4">Рецепт:</div>
|
||||
<div class="col-8">
|
||||
<select id="recipe" name="recipe" class="form-control" ></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col-8"><input type="submit" value="Удалить" class="btn btn-danger" /></div>
|
||||
</div>
|
||||
</form>
|
@ -20,7 +20,7 @@
|
||||
<p>
|
||||
<a asp-action="UpdatePatient">Редактировать пациента</a>
|
||||
<a asp-action="DeletePatient">Удалить пациента</a>
|
||||
<a asp-action="ServiceVisits">Связать пацииента и процедуру</a>
|
||||
<a asp-action="AddProcedureToPatient">Связать пацииента и процедуру</a>
|
||||
</p>
|
||||
<p>
|
||||
<a asp-action="CreatePatient">Создать пациента</a>
|
||||
|
@ -18,11 +18,11 @@
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<a asp-action="UpdateAnimal">Редактировать болезнь</a>
|
||||
<a asp-action="DeleteAnimal">Удалить болезнь</a>
|
||||
<a asp-action="UpdateRecipe">Редактировать болезнь</a>
|
||||
<a asp-action="DeleteRecipe">Удалить болезнь</a>
|
||||
</p>
|
||||
<p>
|
||||
<a asp-action="CreateAnimal">Создать болезнь</a>
|
||||
<a asp-action="CreateRecipe">Создать болезнь</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -18,12 +18,12 @@
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<a asp-action="Update">Редактировать рецепт</a>
|
||||
<a asp-action="Delete">Удалить рецепт</a>
|
||||
<a asp-action="ServiceVisits">Связать рецепт и пациента</a>
|
||||
<a asp-action="UpdateRecipe">Редактировать рецепт</a>
|
||||
<a asp-action="DeleteRecipe">Удалить рецепт</a>
|
||||
<a asp-action="LinkPatientAndProcedure">Связать рецепт и пациента</a>
|
||||
</p>
|
||||
<p>
|
||||
<a asp-action="Create">Создать рецепт</a>
|
||||
<a asp-action="CreateRecipe">Создать рецепт</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -1,28 +1,32 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateDisease";
|
||||
@using HospitalContracts.ViewModels;
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "PatientRecipes";
|
||||
}
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
|
||||
</head>
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Связывание рецепта и пациента</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-form-email u-form-group u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
|
||||
<input type="text"
|
||||
placeholder="Введите описание болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-align-right u-form-group u-form-submit u-label-top">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Рецепт:</div>
|
||||
<div class="col-8">
|
||||
<select id="recipe" name="recipe" class="form-control")"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Пациенты:</div>
|
||||
<div class="col-8">
|
||||
<select name="patients" class="form-control" multiple size="5" id="patients">
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название болезни</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
|
@ -1,28 +1,58 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateDisease";
|
||||
@using HospitalContracts.ViewModels;
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "UpdatePatient";
|
||||
}
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
|
||||
</head>
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Редактирование пациента</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-form-email u-form-group u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
|
||||
<input type="text"
|
||||
placeholder="Введите описание болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-align-right u-form-group u-form-submit u-label-top">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Пациент:</div>
|
||||
<div class="col-8">
|
||||
<select id="patient" name="patient" class="form-control" asp-items="@(new SelectList(@ViewBag.Pacients, "Id", "FIO"))"></select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">ФИО:</div>
|
||||
<div class="col-8"><input type="text" name="name" id="name" class="form-control" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Дата рождения:</div>
|
||||
<div class="col-8">
|
||||
<input type="datetime" id="datetime" name="date" />
|
||||
</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>
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script>
|
||||
function check() {
|
||||
var patient = $('#patient').val();
|
||||
if (patient) {
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
url: "/Home/GetPatient",
|
||||
data: { Id: patient },
|
||||
success: function (result) {
|
||||
$('#fio').val(result.item1.FIO);
|
||||
$('#datebirth').val(result.item1.datebirth);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
check();
|
||||
$('#patient').on('change', function () {
|
||||
check();
|
||||
});
|
||||
</script>
|
||||
}
|
@ -1,28 +1,33 @@
|
||||
@{
|
||||
ViewData["Title"] = "CreateDisease";
|
||||
@using HospitalContracts.ViewModels;
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "UpdateRecipe";
|
||||
}
|
||||
|
||||
<head>
|
||||
<link rel="stylesheet" href="~/css/createdisease.css" asp-append-version="true" />
|
||||
</head>
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Редактирование рецепта</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="u-form-group u-form-name u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-1">Название конференции</label>
|
||||
<input type="text"
|
||||
placeholder="Введите название болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-form-email u-form-group u-label-top">
|
||||
<label class="u-label u-text-custom-color-1 u-label-2">Начало</label>
|
||||
<input type="text"
|
||||
placeholder="Введите описание болезни"
|
||||
name="conferenceName"
|
||||
class="u-input u-input-rectangle" />
|
||||
</div>
|
||||
<div class="u-align-right u-form-group u-form-submit u-label-top">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Сохранить" class="u-active-custom-color-6 u-border-none u-btn u-btn-submit u-button-style u-custom-color-1 u-hover-custom-color-2 u-btn-1" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Рецепт:</div>
|
||||
<div class="col-8">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Название:</div>
|
||||
<div class="col-8"><input type="text" name="name" id="name" class="form-control" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Описание:</div>
|
||||
<div class="col-8"><input type="text" id="family" name="family" class="form-control" /></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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user