Esempio n. 1
0
        // GET: TicketDetailsAdmin
        public ActionResult Details(string trackingId)
        {
            try
            {
                if (!string.IsNullOrEmpty(trackingId))
                {
                    if (!_displayTickets.CheckTrackingIdExists(trackingId))
                    {
                        return(RedirectToAction("Dashboard", "AdminDashboard"));
                    }

                    var ticket = _displayTickets.TicketsDetailsbyticketId(trackingId);
                    ticket.EscalatedUser    = _userMaster.GetTicketEscalatedToUserNames(ticket.TicketId);
                    ticket.ListofPriority   = _priority.GetAllPrioritySelectListItem();
                    ticket.ListofStatus     = _status.GetAllStatusWithoutOverdueandEscalationSelectListItem();
                    ticket.ListofCategory   = _category.GetAllActiveSelectListItemCategory();
                    ticket.TicketLockStatus = _tickets.GetTicketLockStatus(ticket.TicketId);
                    ticket.CategoryId       = ticket.CategoryId;
                    ticket.TicketReply      = new TicketReplyModel()
                    {
                        Message    = string.Empty,
                        TicketId   = ticket.TicketId,
                        TrackingId = ticket.TrackingId,
                    };
                    var listofTicketreply = _ticketsReply.ListofHistoryTicketReplies(trackingId);
                    if (listofTicketreply != null)
                    {
                        ticket.ViewMainModel = new ViewTicketReplyMainModel()
                        {
                            ListofReplyAttachment = _attachments.GetListReplyAttachmentsByAttachmentId(ticket.TicketId),
                            ListofTicketreply     = listofTicketreply
                        };
                        ticket.ListofAttachments = ticket.ListofAttachments = _attachments.GetListAttachmentsByAttachmentId(ticket.TicketId);
                    }
                    else
                    {
                        ticket.ViewMainModel = null;
                    }
                    return(View(ticket));
                }

                return(RedirectToAction("Dashboard", "AdminDashboard"));
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 2
0
        public ActionResult Print()
        {
            try
            {
                if (!string.IsNullOrEmpty(Convert.ToString(TempData["Print_TrackingId"])))
                {
                    var ticket = _displayTickets.TicketsDetailsbyticketId(Convert.ToString(TempData["Print_TrackingId"]));
                    ticket.TicketReply = new TicketReplyModel();
                    var listofTicketreply = _ticketsReply.ListofHistoryTicketReplies(Convert.ToString(TempData["Print_TrackingId"]));
                    if (listofTicketreply != null)
                    {
                        ticket.ViewMainModel = new ViewTicketReplyMainModel();
                        ticket.ViewMainModel.ListofTicketreply = listofTicketreply;
                    }
                    else
                    {
                        ticket.ViewMainModel = null;
                    }

                    return(View(ticket));
                }
                else
                {
                    return(View(new DisplayTicketViewModel()
                    {
                        TrackingId = string.Empty
                    }));
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 3
0
        // GET: TicketDetails
        public ActionResult Details(string trackingId)
        {
            try
            {
                if (!string.IsNullOrEmpty(trackingId))
                {
                    if (!_displayTickets.CheckTrackingIdExists(trackingId))
                    {
                        return(RedirectToAction("Dashboard", "UserDashboard"));
                    }

                    var ticket = _displayTickets.TicketsDetailsbyticketId(trackingId);
                    ticket.ListofPriority   = _priority.GetAllPrioritySelectListItem();
                    ticket.ListofStatus     = _status.GetAllStatusSelectListItem();
                    ticket.TicketLockStatus = _tickets.GetTicketLockStatus(ticket.TicketId);
                    ticket.TicketReply      = new TicketReplyModel()
                    {
                        Message    = string.Empty,
                        TicketId   = ticket.TicketId,
                        TrackingId = ticket.TrackingId,
                    };
                    var listofTicketreply = _ticketsReply.ListofHistoryTicketReplies(trackingId);
                    if (listofTicketreply != null)
                    {
                        ticket.ViewMainModel = new ViewTicketReplyMainModel();
                        ticket.ViewMainModel.ListofReplyAttachment = _attachments.GetListReplyAttachmentsByAttachmentId(ticket.TicketId);
                        ticket.ViewMainModel.ListofTicketreply     = listofTicketreply;
                        ticket.ListofAttachments = ticket.ListofAttachments = _attachments.GetListAttachmentsByAttachmentId(ticket.TicketId);
                    }
                    else
                    {
                        ticket.ViewMainModel = null;
                    }
                    return(View(ticket));
                }

                return(RedirectToAction("Dashboard", "UserDashboard"));
            }
            catch (Exception)
            {
                throw;
            }
        }