public async Task <ActionResult> DeclinePendingTicket(long ticketId) { try { repo.DeclinePendingTicket(ticketId, 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)); } }