Ejemplo n.º 1
0
        public bool UpdateTicketStateAndSendEmail(int ticketId, string uName, TicketsState ts)
        {
            bool flag = true;

            if (ticketId <= 0 && string.IsNullOrEmpty(uName))
            {
                return(false);
            }
            flag = true;
            if (!flag)
            {
                return(false);
            }
            switch (ts)
            {
            case TicketsState.PMReviewed:
                if (uName == "pm")
                {
                    SendSuc = email.SendMail(uName + "@sunnet.us", "", "", "");
                }
                break;

            case TicketsState.Developing:
                if (uName == "user")
                {
                    SendSuc = email.SendMail("user", "", "", "");
                }
                break;

            case TicketsState.TestOnLocalFail:
                if (uName == "user")
                {
                    SendSuc = email.SendMail("user", "", "", "");
                }
                break;

            case TicketsState.TestOnLocalSuc:
                if (uName == "user")
                {
                    SendSuc = email.SendMail("user", "", "", "");
                }
                break;

            case TicketsState.Completed:
                if (uName == "user")
                {
                    SendSuc = email.SendMail("user", "", "", "");
                }
                break;

            default:
                SendSuc = false;
                break;
            }

            return(flag);
        }
Ejemplo n.º 2
0
        public void AddTicket(TicketsEntity te, TicketUsersEntity tu)
        {
            FakeEmailSender emailSender = new FakeEmailSender();

            emailSender.SendMail(tu.UserID.ToString(), "", te.Title, te.Description);
        }