Browse Source
Merge pull request #135 from abpframework/ProductDetail-OrderService-Dependency-14387
Applied the temporary solution
gterdem/swagger_update
Galip Tolga Erdem
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
1 deletions
-
apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs
|
|
|
@ -29,8 +29,17 @@ namespace EShopOnAbp.PublicWeb.Pages |
|
|
|
|
|
|
|
public async Task OnGet(Guid id) |
|
|
|
{ |
|
|
|
IsPurschased = (await _orderAppService.GetMyOrdersAsync(new GetMyOrdersInput())).Any(p => p.Items.Any(p => p.ProductId == id)); |
|
|
|
Product = await _productAppService.GetAsync(id); |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
IsPurschased = (await _orderAppService.GetMyOrdersAsync(new GetMyOrdersInput())).Any(p => p.Items.Any(p => p.ProductId == id)); |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
IsPurschased = false; |
|
|
|
Console.WriteLine(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |