示例#1
0
        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));
        }
示例#2
0
 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;
         }
     }
 }