public ActionResult UpdateStatus(int id) { try { InvoiceDto invoiceDto = invoicesService.GetById(id); if (invoiceDto == null) { throw new Exception("Відправлення не знайдено."); } invoicesService.UpdateStatusAsync(id); return(RedirectToAction("Details", id)); } catch (Exception ex) { deliveryMessage.Title = "Відправлення"; deliveryMessage.Body = ex.Message; return(View("DeliveryMessage", deliveryMessage)); } }