Пример #1
0
 public static IWorkItemAction CreateAction(Sage.Entity.Interfaces.IWorkItemAction data)
 {
     IWorkItemAction action = null;
     switch (data.ActionType)
     {
         case "Email Notification":
             action = new EmailAction();
             // TODO - this needs to eb dynamic
             action.DeliverySystem = new SmtpDeliverySystem(new SmtpSettings
             {
                 EnableSsl = true,
                 SmtpPort = 587,
                 SmtpServer = "smtp.gmail.com",
                 SmtpUser = "******",
                 SmtpUserPassword = "******",
                 EmailAddress = "*****@*****.**",
                 DisplayName = "Saleslogix DTS",
                 IsBodyHtml = false
             }
             );
             break;
         default:
             throw new Exception("Invalid action type " + data.ActionType);
     }
     action.LoadConfiguration(data.ActionValue);
     return action;
 }