Merge branch 'WebRepart' of https://git.is.ulstu.ru/Ilfedotov.01/CourseWorkElectronicsShop into WebRepart
This commit is contained in:
commit
277588130b
@ -12,7 +12,7 @@ namespace ElectronicsShopDataBaseImplement
|
|||||||
optionsBuilder)
|
optionsBuilder)
|
||||||
{
|
{
|
||||||
if (optionsBuilder.IsConfigured == false) {
|
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);
|
base.OnConfiguring(optionsBuilder);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ namespace ElectronicsShopDataBaseImplement.Models
|
|||||||
}
|
}
|
||||||
context.SaveChanges();
|
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;
|
order.Sum = model.Sum;
|
||||||
foreach (var op in model.ProductList) {
|
foreach (var op in model.ProductList) {
|
||||||
context.OrderProducts.Add(new OrderProduct {
|
context.OrderProducts.Add(new OrderProduct {
|
||||||
|
@ -135,7 +135,7 @@ namespace ElectronicsShopUserApp.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
return Redirect("Orders");
|
return RedirectToAction("Orders");
|
||||||
}
|
}
|
||||||
var products = APIClient.GetRequset<List<List<string>>>($"api/main/getorderproducts?_orderid={id}");
|
var products = APIClient.GetRequset<List<List<string>>>($"api/main/getorderproducts?_orderid={id}");
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
Количество
|
Количество
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Сумма
|
Цена за единицу товара
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
Количество
|
Количество
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Сумма
|
Цена за единицу товара
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
Loading…
Reference in New Issue
Block a user