@{
	ViewData["Title"] = "CreateVaccination";
}

<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">
			<select id="vaccination" name="vaccination" class="form-control" asp-items="@(new SelectList(@ViewBag.Vaccinations, "Id", "NameVaccination"))"></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>
<script>
	$('#vaccination').on('change', function () {
		check();
	});
	function check() {
		if (snack) {
			$.ajax({
				method: "POST",
				url: "/Home/GetVaccination",
				data: { vaccination: vaccination },
				success: function (result) {
					$("#vaccination").val(result);
				}
			});
		};
	}
</script>

