Сдано
This commit is contained in:
parent
af47f03177
commit
5058d91b54
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
namespace CarRepairShopDatabaseImplement.Migrations
|
namespace CarRepairShopDatabaseImplement.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(RepairsShopDatabase))]
|
[DbContext(typeof(RepairsShopDatabase))]
|
||||||
[Migration("20240420131523_InitialCreate")]
|
[Migration("20240424130916_InitialCreate")]
|
||||||
partial class InitialCreate
|
partial class InitialCreate
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
@ -174,7 +174,7 @@ namespace CarRepairShowShopApp.Controllers
|
|||||||
return Redirect("~/Home/Enter");
|
return Redirect("~/Home/Enter");
|
||||||
}
|
}
|
||||||
ViewBag.Shops = ApiClient.GetRequest<List<ShopViewModel>>("api/shop/getshops");
|
ViewBag.Shops = ApiClient.GetRequest<List<ShopViewModel>>("api/shop/getshops");
|
||||||
ViewBag.ListIceCream = ApiClient.GetRequest<List<RepairViewModel>>("api/main/GetRepairList");
|
ViewBag.ListRepair = ApiClient.GetRequest<List<RepairViewModel>>("api/main/GetRepairList");
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,8 +33,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-8"></div>
|
<div class="col-8"></div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<input type="submit" value="Создать" class="btn
|
<input type="submit" value="Создать" class="btn btn-primary" />
|
||||||
btn-primary" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
@ -20,7 +20,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">Ремонт:</div>
|
<div class="col-4">Ремонт:</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<select id="icecream" name="icecream" class="form-control" asp-items="@(new SelectList(@ViewBag.ListIceCream, "Id", "RepairName"))"></select>
|
<select id="repair" name="repair" class="form-control" asp-items="@(new SelectList(@ViewBag.ListRepair, "Id", "RepairName"))"></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -51,29 +51,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
@section Scripts
|
||||||
@section Scripts
|
{
|
||||||
{
|
<script>
|
||||||
<script>
|
function check() {
|
||||||
function check() {
|
var shop = $('#shop').val();
|
||||||
var shop = $('#shop').val();
|
if (shop) {
|
||||||
if (shop) {
|
$.ajax({
|
||||||
$.ajax({
|
method: "GET",
|
||||||
method: "GET",
|
url: "/Home/GetShop",
|
||||||
url: "/Home/GetShop",
|
data: { shopId: shop },
|
||||||
data: { shopId: shop },
|
success: function (result) {
|
||||||
success: function (result) {
|
$('#name').val(result.item1.shopName);
|
||||||
$('#name').val(result.item1.shopName);
|
$('#address').val(result.item1.address);
|
||||||
$('#address').val(result.item1.address);
|
$('#dateopen').val(result.item1.dateOpen);
|
||||||
$('#dateopen').val(result.item1.dateOpen);
|
$('#maxcapacity').val(result.item1.maxCapacity);
|
||||||
$('#maxcapacity').val(result.item1.maxCapacity);
|
$('#table-elements').html(result.item2);
|
||||||
$('#table-elements').html(result.item2);
|
}
|
||||||
}
|
});
|
||||||
});
|
};
|
||||||
};
|
}
|
||||||
}
|
check();
|
||||||
check();
|
$('#shop').on('change', function () {
|
||||||
$('#shop').on('change', function () {
|
|
||||||
check();
|
check();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<footer class="border-top footer text-muted">
|
<footer class="border-top footer text-muted">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
© 2024 - CarRepairShowShopApp - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
© 2024 - Магазин ремонтов - <a asp-area="" asp-controller="Home"></a>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user