Пример #1
0
        public ActionResult AcknowlageTicket(string id)
        {
            HelpDeskLogic hdl    = new HelpDeskLogic();
            var           ticket = hdl.GetTicket(int.Parse(id));

            return(View(ticket));
        }
Пример #2
0
        public PartialViewResult _Completed(string id)
        {
            HelpDeskLogic hdl     = new HelpDeskLogic();
            var           tickets = hdl.CompletedTickets(id);

            return(PartialView("_Completed", tickets));
        }
Пример #3
0
        public PartialViewResult _AllTickets(string id)
        {
            HelpDeskLogic hdl     = new HelpDeskLogic();
            var           tickets = hdl.AllTickets(id);

            return(PartialView("_AllTickets", tickets));
        }
Пример #4
0
        public PartialViewResult _UnAknowlaged(string id)
        {
            HelpDeskLogic hdl     = new HelpDeskLogic();
            var           tickets = hdl.UnAknowlagedTickets(id);

            return(PartialView("_UnAknowlaged", tickets));
        }
Пример #5
0
        public ActionResult TicketsFilter(string id)
        {
            HelpDeskLogic hdl = new HelpDeskLogic();

            Session["Technician"] = hdl.GetEmployee(id).fullname;
            ViewData["id"]        = hdl.GetEmployee(id).employeeNumber;
            return(View(hdl));
        }
Пример #6
0
        public PartialViewResult _OpenedTickets()
        {
            HelpDeskLogic hdl     = new HelpDeskLogic();
            var           id      = ViewData["id"].ToString();
            var           tickets = hdl.OpenTickets(id);

            return(PartialView("_OpenedTickets", tickets));
        }
Пример #7
0
        public ActionResult Index()
        {
            HelpDeskLogic hdl = new HelpDeskLogic();

            ViewBag.UserID     = User.Identity.Name;
            ViewData["Role"]   = User.IsInRole("Administrator");
            ViewBag.Controller = "Technician";
            return(View(hdl.GetParticipantReport(User.Identity.Name)));
        }
Пример #8
0
        // 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));
        }
Пример #9
0
        public ActionResult Ticket(string id)
        {
            HelpDeskLogic        hdl = new HelpDeskLogic();
            AssetManagementLogic aml = new AssetManagementLogic();
            var Ticket   = hdl.GetTicket(int.Parse(id));
            var duration = new TimeSpan();

            if (Ticket.accomplishstatus == true)
            {
                duration = Ticket.datecompleted.Value.Subtract(Ticket.datecreated);
            }
            else
            {
                duration = DateTime.Now.Subtract(Ticket.datecreated);
            }
            ViewData["duration"] = duration;
            ViewData["Asset"]    = aml.GetAsset(Ticket.assetid.ToString());
            return(View(Ticket));
        }
Пример #10
0
        //
        // GET: /Dashboard/
        public ActionResult Dashboard()
        {
            int s = 0;

            ViewBag.getAssets   = list.Assets().Count;
            ViewBag.getEmployee = list.Employees().Count;
            HelpDeskLogic hdl = new HelpDeskLogic();

            ViewBag.AllTickets = hdl.getAllTickets();

            ViewBag.TicketParticipant = hdl.GetParticipantReport(User.Identity.Name);
            foreach (Stock st in context.Stocks.ToList())
            {
                s += st.quantity;
            }
            ViewBag.getStock = s;
            var ticketsPerDevice = new TicketsByDevicesReport();

            ticketsPerDevice.AssignTickets();
            return(View(ticketsPerDevice));;
        }
Пример #11
0
        // GET: Report
        public ActionResult Index()
        {
            HelpDeskLogic hdl = new HelpDeskLogic();

            return(View(hdl));
        }
Пример #12
0
        public PartialViewResult _TicketsPerParticipant(string id)
        {
            HelpDeskLogic hdl = new HelpDeskLogic();

            return(PartialView("_TicketsPerParticipant", hdl.GetParticipantReport(id)));
        }
Пример #13
0
        public ActionResult OverDueTickets()
        {
            var hdl = new HelpDeskLogic();

            return(View(hdl.GetOverDueTickets()));
        }