public async Task <ActionResult> DeclineApprovedTicket(long ticketId, int poolId) { try { repo.DeclineApprovedTicket(ticketId, poolId, TicketStatus.Declined, AdminId, EasternStandardTimeNow); await SendDeclineConfirmEmailAsync(ticketId); await SendNotificationDeclinedAsync(ticketId); return(Json(new { success = true, message = "Ticket declined successfully and confirmation email send." }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { success = false, message = ex.Message }, JsonRequestBehavior.AllowGet)); } }