вроде как готовая 5 лаба

This commit is contained in:
Галина Федоренко 2024-04-22 17:59:57 +04:00
parent 01d41f519d
commit c96b2e56cb
7 changed files with 14 additions and 8 deletions

View File

@ -87,6 +87,7 @@ namespace CarpentryWorkshopView
{
Id = id,
WoodId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["WoodId"].Value),
ClientId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["ClientId"].Value),
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),

View File

@ -13,8 +13,7 @@ namespace CarpentryWorkshopClientApp
{
_client.BaseAddress = new Uri(configuration["IPAddress"]);
_client.DefaultRequestHeaders.Accept.Clear();
_client.DefaultRequestHeaders.Accept.Add(new
MediaTypeWithQualityHeaderValue("application/json"));
_client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
public static T? GetRequest<T>(string requestUrl)
{

View File

@ -8,6 +8,7 @@ namespace CarpentryWorkshopContracts.BindingModels
public int Id { get; set; }
public int WoodId { get; set; }
public int ClientId { get; set; }
public string ClientFIO { get; set; } = string.Empty;
public int Count { get; set; }
public double Sum { get; set; }
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;

View File

@ -44,7 +44,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
b.HasKey("Id");
b.ToTable("Clients");
b.ToTable("Clients", (string)null);
});
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Component", b =>
@ -64,7 +64,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
b.HasKey("Id");
b.ToTable("Components");
b.ToTable("Components", (string)null);
});
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Order", b =>
@ -102,7 +102,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
b.HasIndex("WoodId");
b.ToTable("Orders");
b.ToTable("Orders", (string)null);
});
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Wood", b =>
@ -122,7 +122,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
b.HasKey("Id");
b.ToTable("Woods");
b.ToTable("Woods", (string)null);
});
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.WoodComponent", b =>
@ -148,7 +148,7 @@ namespace CarpentryWorkshopDatabaseImplement.Migrations
b.HasIndex("WoodId");
b.ToTable("WoodComponents");
b.ToTable("WoodComponents", (string)null);
});
modelBuilder.Entity("CarpentryWorkshopDatabaseImplement.Models.Order", b =>

View File

@ -59,6 +59,7 @@ namespace CarpentryWorkshopDatabaseImplement.Models
{
WoodId = WoodId,
ClientId = ClientId,
ClientFIO = Client.ClientFIO,
Count = Count,
Sum = Sum,
DateCreate = DateCreate,

View File

@ -7,6 +7,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="8.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<file value="c:/temp/PrecastConcretePlantRestApi.log" />
<file value="c:/temp/CarpentryWorkshopRestApi.log" />
<appendToFile value="true" />
<maximumFileSize value="100KB" />
<maxSizeRollBackups value="2" />