Exemple #1
0
 public ActionResult EditTicket(string trackingid)
 {
     try
     {
         var ticketsViewModel = _tickets.EditTicketsByTicketId(trackingid);
         ticketsViewModel.HasAttachment     = _attachments.CheckAttachmentsExistbyTicketId(trackingid);
         ticketsViewModel.ListofCategory    = _category.GetAllActiveSelectListItemCategory();
         ticketsViewModel.ListofPriority    = _priority.GetAllPrioritySelectListItem();
         ticketsViewModel.ListofAttachments = _attachments.GetListAttachmentsByAttachmentId(ticketsViewModel.TicketId);
         return(View(ticketsViewModel));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #2
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;
            }
        }
Exemple #3
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;
            }
        }