private void PersistAM() { var cached = _graph.Caches[_activityMessage.GetType()].Locate(_activityMessage); _graph.Persist(); _graph.SelectTimeStamp(); var cache = _graph.Caches[_activityMessage.GetType()]; _activityMessage = (CRSMEmail)cache.CreateCopy(cached); }
public MessageProcessor(int?accountID) { _graph = new PXGraph(); _graph.SelectTimeStamp(); ReadAccount(accountID); PXSelect <PreferencesEmail> .Clear(_graph); }
private void PersistMessage() { var cached = _graph.Caches[_message.GetType()].Locate(_message); _graph.Persist(); _graph.SelectTimeStamp(); var cache = _graph.Caches[_message.GetType()]; _message = (EPActivity)cache.CreateCopy(cached); }
private void UpdateMessage(SMEmail message) { var emailType = message.GetType(); var cache = _graph.Caches[emailType]; message = (SMEmail)cache.Update(message); _graph.EnsureCachePersistence(emailType); var cached = _graph.Caches[message.GetType()].Locate(message); _graph.Persist(); _graph.SelectTimeStamp(); message = (SMEmail)cache.CreateCopy(cached); }
public void Send(int accountId) { var graph = new PXGraph(); graph.SelectTimeStamp(); if (MailAccountManager.IsMailProcessingOff) { throw new PXException(Messages.MailProcessingIsTurnedOff); } new MessageProcessor(accountId).ProcessAll(); }