public async Task <JsonResult> SaveChanges(TicketChangeInformationParameters parameters) { var user = (TokenUser)HttpContext.Items["User"]; await _ticketProxy.Update(user.Token, parameters); TempData["message"] = $" Your change is save successfully "; return(Json(new { })); }
public async Task <IActionResult> CloseTicket(TicketRepliesParameters parameters) { var user = (TokenUser)HttpContext.Items["User"]; var result = await _ticketProxy.Update(user.Token, parameters.Ticket.Id); if (result != null) { TempData["message"] = $" Your ticket id: {parameters.Ticket.Id } closed successfully"; return(RedirectToAction("Index")); } TempData["errorMessage"] = $"Something went wrong, please try again to close your ticket."; return(RedirectToAction("View", new { result.Id })); }