LabWork05_Hard: Готово
This commit is contained in:
parent
fe90954785
commit
a41f1a5638
1
.gitignore
vendored
1
.gitignore
vendored
@ -398,3 +398,4 @@ FodyWeavers.xsd
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
/AutomobilePlant/ImplementationExtensions
|
@ -49,7 +49,6 @@
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
function getData() {
|
||||
$.ajax({
|
||||
method: "GET",
|
||||
@ -57,19 +56,19 @@
|
||||
data: { shopId: $('#shop').val()},
|
||||
success: function (result) {
|
||||
console.log(result)
|
||||
$("#name").val(result.Name);
|
||||
$("#openingDate").val(new Date(result.OpeningDate).toISOString().substring(0, 16));
|
||||
$("#address").val(result.Address);
|
||||
$("#count").val(result.MaxCountCars);
|
||||
fillTable(result.CarCount);
|
||||
$("#name").val(result.name);
|
||||
$("#openingDate").val(new Date(result.openingDate).toISOString().substring(0, 16));
|
||||
$("#address").val(result.address);
|
||||
$("#count").val(result.maxCountCars);
|
||||
fillTable(result.carCount);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function fillTable(CarCount) {
|
||||
function fillTable(carCount) {
|
||||
$("#carCount").empty();
|
||||
|
||||
for (var i = 0; i < CarCount.length; i++)
|
||||
for (var i = 0; i < carCount.length; i++)
|
||||
$("#carCount").append('<tr><td>' + carCount[i].item1 + '</td><td>' + carCount[i].item2 + '</td></tr>');
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user