Example #1
0
        public IActionResult GetPrint(Guid orderGuid)
        {
            try
            {
                var order   = _bl.GetOrders(orderGuid);
                var damages = _bl.GetDamages().Where(d => d.Date <= DateTime.Now).ToList();
                var result  = _pdfService.GenerateContrtactPdf(order, damages);

                return(File(result, "application/Pdf"));
            }
            catch (Exception ex)
            {
                _log.LogError("Exception: '{0}'", ex);
                return(StatusCode(500));
            }
        }