// GET: Tickets public ActionResult Index() { ViewBag.MySolutions = _context.Tickets.Where(t => t.employeeNumber.Equals(User.Identity.Name) && t.solution != null && t.ticketstatus == false) .ToList().Count(); ViewBag.KnowledgeBase = _context.Tickets.Where(x => x.solution != null && x.ticketstatus == false).ToList().Count(); HelpDeskLogic hdl = new HelpDeskLogic(); TicketReportPerParticipant tr = hdl.getAllTickets(); TicketReportPerParticipant AdminTickets = hdl.GetParticipantReport(User.Identity.Name); List <TicketReportPerParticipant> TicketsFilter = new List <TicketReportPerParticipant>(); TicketsFilter.Add(tr); TicketsFilter.Add(AdminTickets); ViewBag.OverDueTickets = hdl.GetOverDueTickets().Count.ToString(); ViewBag.ControllerName = "HelpDesk"; ViewData["Role"] = User.IsInRole("Administrator"); return(View(TicketsFilter)); }
public ActionResult OverDueTickets() { var hdl = new HelpDeskLogic(); return(View(hdl.GetOverDueTickets())); }