Exemplo n.º 1
0
        public async Task <ActionResult> GetTicket(int id)
        {
            ViewBag.Statuses = new SelectList(await this.ticketsStatusRepository.GetAll(), "TicketStatusId", "Status");
            var ticket = await ticketsRepository.Get(id);

            return(View("ShowTicket", ticket));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> GetMessages(int ticketId)
        {
            var ticket = await ticketsRepository.Get(ticketId);

            var messages = ticket.Messages?.ToList();

            ViewBag.TicketId = ticketId;
            return(View(messages));
        }
Exemplo n.º 3
0
        public void SendEmailtoPMForFeedBack(FeedBacksEntity fe)
        {
            string        to = "";
            TicketsEntity te = ticketsRpst.Get(fe.TicketID);

            te.Status = TicketsState.Submitted;
            to        = SendEmailByTicketState(te);//get pm's email

            //xml 发送邮件
            XElement xmlInvoice1 = XElement.Load(System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "Template/SendEmailToPmForFeedBack.xml");

            emailBody    = xmlInvoice1.Element("email").Elements("content").First().Value;
            emailSubject = xmlInvoice1.Element("email").Elements("subject").First().Value
                           .Replace("{TicketID}", te.TicketID.ToString())
                           .Replace("{TicketTitle}", te.Title);
            emailBody = emailBody.Replace("{TicketID}", te.TicketID.ToString())
                        .Replace("{userName}", GetNameById(fe.CreatedBy));

            SFConfig.Components.EmailSender.SendMail(to, emailSubject, emailBody, true, MailPriority.Normal);
        }
 public Ticket Get(int id)
 {
     return(repository.Get(id));
 }