Готово
This commit is contained in:
parent
086dd8bc65
commit
da1d5a588d
@ -24,12 +24,9 @@ namespace CarRepairShop
|
||||
{
|
||||
DataGridView.DataSource = list;
|
||||
DataGridView.Columns["Id"].Visible = false;
|
||||
DataGridView.Columns["ClientFIO"].AutoSizeMode =
|
||||
DataGridViewAutoSizeColumnMode.Fill;
|
||||
DataGridView.Columns["Email"].AutoSizeMode =
|
||||
DataGridViewAutoSizeColumnMode.Fill;
|
||||
DataGridView.Columns["Password"].AutoSizeMode =
|
||||
DataGridViewAutoSizeColumnMode.Fill;
|
||||
DataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
DataGridView.Columns["Email"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
DataGridView.Columns["Password"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
}
|
||||
_logger.LogInformation("Загрузка клиентов");
|
||||
}
|
||||
|
@ -123,8 +123,7 @@ namespace CarRepairShop
|
||||
{
|
||||
if (dataGridView.SelectedRows.Count == 1)
|
||||
{
|
||||
int id =
|
||||
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
_logger.LogInformation("Заказ №{id}. Меняется статус на 'В работе'", id);
|
||||
try
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace CarRepairShopDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(RepairsShopDatabase))]
|
||||
[Migration("20240407151705_InitialCreate")]
|
||||
[Migration("20240409171711_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CarRepairShopContracts\CarRepairShopContracts.csproj" />
|
||||
<ProjectReference Include="..\CarRepairShopRestApi\CarRepairShopRestApi.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -112,8 +112,7 @@ namespace CarRepairShowClientApp.Controllers
|
||||
[HttpGet]
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewBag.Products =
|
||||
APIClient.GetRequest<List<RepairViewModel>>("api/main/getproductlist");
|
||||
ViewBag.Repairs = APIClient.GetRequest<List<RepairViewModel>>("api/main/getrepairlist");
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
@ -140,7 +139,7 @@ namespace CarRepairShowClientApp.Controllers
|
||||
[HttpPost]
|
||||
public double Calc(int count, int repair)
|
||||
{
|
||||
var rep = APIClient.GetRequest<RepairViewModel>($"api/main/getproduct?productId={repair}"
|
||||
var rep = APIClient.GetRequest<RepairViewModel>($"api/main/getrepair?repairId={repair}"
|
||||
);
|
||||
return count * (rep?.Price ?? 1);
|
||||
}
|
||||
|
@ -6,6 +6,6 @@
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ipaddress": "http://localhost:5174/"
|
||||
"IPAddress": "http://localhost:5174"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user