示例#1
0
        public async Task <IActionResult> RaisedTicket()
        {
            AdminTicketVM adminTicketVM = new AdminTicketVM();
            bool          _checkSession = CheckSession();

            if (_checkSession)
            {
                return(RedirectToAction(nameof(Logout)));
            }
            try
            {
                adminTicketVM.tickets = await _ticket.GetAllTicket();

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

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

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

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

                adminTicketVM.getTicketInProgressCount = await _admin.GetTicketInProgressCount() ?? 0;
            }
            catch (Exception ex)
            {
                _logger.LogError($"{ex?.InnerException?.InnerException?.Message}");
            }
            return(View(adminTicketVM));
        }