public async Task <IActionResult> Details(string orderId) { var order = await _orderManagementApi.GetOrderByIDAsync(Guid.Parse(orderId)); order.ImageUrl = ConvertAndFormatToString(order.ImageData); order.Status = DeterMineStatus(order.Status); foreach (var detail in order.orderDetails) { detail.ImageUrl = ConvertAndFormatToString(detail.FaceData); } return(View(order)); }
public async Task <OrderViewModel> GetOrderByIDAsync(Guid id) { try { return(await _restClient.GetOrderByIDAsync(id)); } catch (ApiException ex) { if (ex.StatusCode == HttpStatusCode.NotFound) { return(null); } else { throw; } } }