Beispiel #1
0
        /// <summary>
        /// wait client feedback
        /// </summary>
        /// <param name="fe"></param>

        public void SendEmailtoClientForFeedBack(FeedBacksEntity fe)
        {
            string contentTemplete = GetEmailExecuter("SendEmailToClientForFeedBack.txt");

            string        from     = Config.DefaultSendEmail;
            string        to       = "";
            TicketsEntity te       = ticketsRpst.Get(fe.TicketID);
            var           creators = ticketsUserRpst.GetTicketUser(fe.TicketID, TicketUsersType.Create);
            var           creator  = creators != null && creators.Count > 0 ? creators[0] : null;

            if (creator != null)
            {
                var user = userRpst.Get(creator.UserID);
                to = user.Email;
                string subject = string.Format("Ticket #{0} {1} needs your feedback.", te.TicketCode, te.Title);
                string content = string.Empty;
                if (!string.IsNullOrEmpty(contentTemplete.Trim()))
                {
                    content = contentTemplete.Trim();
                    content = content.Replace("[ClientName]", user.FirstAndLastName);
                    content = content.Replace("[PmName]", GetUnameByRoleTypeAndTicketId(te.TicketID, TicketUsersType.PM));
                }

                emailSender.SendMail(to, @from, subject, content.ToString());
            }
        }
Beispiel #2
0
 public List <TicketUsersEntity> GetTicketUser(int ticketID, TicketUsersType type)
 {
     return(ticketUserRpst.GetTicketUser(ticketID, type));
 }