Example #1
0
        public async Task <IActionResult> TicketDetails(string ticketId)
        {
            AdminTicketDetailsVM adminTicketDetails = new AdminTicketDetailsVM();
            bool _checkSession = CheckSession();

            if (_checkSession)
            {
                return(RedirectToAction(nameof(Logout)));
            }
            try
            {
                adminTicketDetails.ticketDetail = await _ticket.GetTicket(ticketId);

                adminTicketDetails.getClientCount = await _admin.GetClientCount() ?? 0;

                adminTicketDetails.getTicketCount = await _admin.GetTicketCount() ?? 0;

                adminTicketDetails.getOpenTicketCount = await _admin.GetOpenTicketCount() ?? 0;

                adminTicketDetails.getClosedTicketCount = await _admin.GetClosedTicketCount() ?? 0;

                adminTicketDetails.getTicketInProgressCount = await _admin.GetTicketInProgressCount() ?? 0;
            }
            catch (Exception ex)
            {
                _logger.LogError($"{ex?.InnerException?.InnerException?.Message}");
            }
            return(View(adminTicketDetails));
        }
Example #2
0
        public async Task <IActionResult> TicketDetails(string ticketId)
        {
            TicketDetail ticketDetail  = null;
            bool         _checkSession = CheckSession();

            if (_checkSession)
            {
                return(RedirectToAction(nameof(Logout)));
            }
            try
            {
                ticketDetail = await _ticket.GetTicket(ticketId);
            }
            catch (Exception ex)
            {
                _logger.LogError($"{ex?.InnerException?.InnerException?.Message}");
            }
            return(View(ticketDetail));
        }