public void TestSaveSms() { var message = new EzbobSmsMessage { AccountSid = "accsid", ApiVersion = "apiver", Body = "test", DateCreated = DateTime.UtcNow, DateSent = DateTime.UtcNow, DateUpdated = DateTime.UtcNow, Direction = "dir", From = "from", To = "to", Price = 0.2M, Sid = "sid", Status = "status", UnderwriterId = 1, UserId = null }; m_oDB.ExecuteNonQuery("SaveSmsMessage", CommandSpecies.StoredProcedure, m_oDB.CreateTableParameter <EzbobSmsMessage>("Tbl", new List <EzbobSmsMessage> { message })); }
private void AddSalesForceActivity(EzbobSmsMessage message) { if (!message.UserId.HasValue) { return; } var customerData = new CustomerData(this, message.UserId.Value, DB); customerData.Load(); var addActivityStrategy = new AddActivity(message.UserId, new ActivityModel { Description = string.Format("Received SMS: {0}", message.Body), Email = customerData.Mail, Origin = customerData.Origin, StartDate = DateTime.UtcNow, EndDate = DateTime.UtcNow, IsOpportunity = false, Originator = "System", Type = ActivityType.Sms.DescriptionAttr(), }); addActivityStrategy.Execute(); }