Готово

This commit is contained in:
Yunusov_Niyaz 2024-04-10 11:46:00 +04:00
parent 086dd8bc65
commit da1d5a588d
7 changed files with 26 additions and 13 deletions

View File

@ -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("Загрузка клиентов");
}

View File

@ -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
{

View File

@ -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 />

View File

@ -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>

View File

@ -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);
}

View File

@ -6,6 +6,6 @@
}
},
"AllowedHosts": "*",
"ipaddress": "http://localhost:5174/"
"IPAddress": "http://localhost:5174"
}