fix
This commit is contained in:
parent
92be4d7331
commit
f7bad7a0bf
@ -12,7 +12,7 @@ namespace ElectronicsShopDataBaseImplement
|
||||
optionsBuilder)
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false) {
|
||||
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-E2VPEN3\SQLEXPRESS;Initial Catalog=ElectronicsShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-O0N00SH\SQLEXPRESS;Initial Catalog=ElectronicsShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ namespace ElectronicsShopDataBaseImplement.Models
|
||||
}
|
||||
context.SaveChanges();
|
||||
}
|
||||
var order = context.Orders.First(x => x.ID == model.ID);
|
||||
var order = context.Orders.FirstOrDefault(x => x.ID == model.ID);
|
||||
order.Sum = model.Sum;
|
||||
foreach (var op in model.ProductList) {
|
||||
context.OrderProducts.Add(new OrderProduct {
|
||||
|
@ -135,7 +135,7 @@ namespace ElectronicsShopUserApp.Controllers {
|
||||
}
|
||||
|
||||
if (id == 0) {
|
||||
return Redirect("Orders");
|
||||
return RedirectToAction("Orders");
|
||||
}
|
||||
var products = APIClient.GetRequset<List<List<string>>>($"api/main/getorderproducts?_orderid={id}");
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
Количество
|
||||
</th>
|
||||
<th>
|
||||
Сумма
|
||||
Цена за единицу товара
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -43,7 +43,7 @@
|
||||
Количество
|
||||
</th>
|
||||
<th>
|
||||
Сумма
|
||||
Цена за единицу товара
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
Loading…
Reference in New Issue
Block a user