47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
@using CarShowroomDataModels.Views
|
|
@{
|
|
ViewData["Title"] = "ClientUpdate";
|
|
}
|
|
<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="phonenumber" /></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-8"></div>
|
|
<div class="col-4">
|
|
<input type="submit" value="C"
|
|
class="btn btn-primary" />
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
@section Scripts
|
|
{
|
|
<script>
|
|
function check() {
|
|
var client = $('#client').val();
|
|
if (client) {
|
|
$.ajax({
|
|
method: "GET",
|
|
url: "/Home/GetClient",
|
|
data: { clientId: client },
|
|
success: function (result) {
|
|
$('#number').val(result.item1.number);
|
|
}
|
|
});
|
|
};
|
|
}
|
|
check();
|
|
$('#client').on('change', function () {
|
|
check();
|
|
});
|
|
</script>
|
|
} |