// GET: Pricing/Details/5 public async Task <ActionResult> Details(Guid id) { var price = new PricingDetailsViewModel(); try { var result = await _pricingService.FindById(id); if (!result.Success) { Alert($"Error! {result.Message}", NotificationType.info, Int32.Parse(_appConfig.Value.NotificationDisplayTime)); return(View(price)); } price.Code = result.Data.Code; price.Id = result.Data.Id; price.Price = result.Data.Price; price.Product = result.Data.Product.Name; price.Tier = result.Data.Tier.Name; price.DateCreated = result.Data.CreatedAt; price.DateLastUpdated = result.Data.LastUpdated; return(View(price)); } catch (Exception ex) { Alert($"Error! {ex.Message}", NotificationType.error, Int32.Parse(_appConfig.Value.NotificationDisplayTime)); return(View(price)); } }