done
This commit is contained in:
parent
ca7a93ded7
commit
111b5a54da
@ -33,7 +33,7 @@ namespace BlacksmithWorkshopClientApp
|
||||
var json = JsonConvert.SerializeObject(model);
|
||||
var data = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
var response = _client.PostAsync(requestUrl, data);
|
||||
var response = _client.PostAsync(requestUrl, data);
|
||||
|
||||
var result = response.Result.Content.ReadAsStringAsync().Result;
|
||||
if (!response.Result.IsSuccessStatusCode)
|
||||
|
@ -1,10 +1,12 @@
|
||||
using BlacksmithWorkshopClientApp;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
APIClient.Connect(builder.Configuration);
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
|
@ -7,5 +7,5 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"IPAddress": "http://localhost:5263/"
|
||||
"IPAddress": "https://localhost:7116/"
|
||||
}
|
||||
|
@ -78,11 +78,11 @@ namespace BlacksmithWorkshopDatabaseImplement.Implements
|
||||
{
|
||||
using var context = new BlacksmithWorkshopDatabase();
|
||||
return context.Orders
|
||||
.Include(x => x.Manufacture)
|
||||
.Include(x => x.Client)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
.Include(x => x.Manufacture)
|
||||
.Include(x => x.Client)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
public OrderViewModel? Insert(OrderBindingModel model)
|
||||
{
|
||||
var newOrder = Order.Create(model);
|
||||
|
@ -19,6 +19,7 @@ namespace BlacksmithWorkshopDatabaseImplement.Models
|
||||
public int ManufactureId { get; set; }
|
||||
[Required]
|
||||
public int ClientId { get; set; }
|
||||
//public string ClientFIO { get; set; }
|
||||
[Required]
|
||||
public int Count { get; set; }
|
||||
[Required]
|
||||
@ -63,6 +64,7 @@ namespace BlacksmithWorkshopDatabaseImplement.Models
|
||||
ManufactureId = ManufactureId,
|
||||
ManufactureName = Manufacture.ManufactureName,
|
||||
ClientId = ClientId,
|
||||
ClientFIO = Client.ClientFIO,
|
||||
Count = Count,
|
||||
Sum = Sum,
|
||||
Status = Status,
|
||||
|
Loading…
x
Reference in New Issue
Block a user