protected virtual void WriteCommLogEntry(int customerId, long?historyId, string host, string messageString,
                                                 CommunicationLogEntryMessageQualifier direction, string trackingId, string serialNumber)
        {
            var service  = ServiceUtilities.GetService <ICommunicationLogService>(context);
            var logEntry = new CommunicationLogEntry
            {
                CustomerId        = customerId,
                HistoryId         = historyId,
                Host              = host,
                Message           = messageString,
                MessageQualifier  = direction,
                MessageTrackingId =
                    (string.IsNullOrEmpty(trackingId)) ? historyId.GetValueOrDefault().ToString() : trackingId,
                SerialNumber = serialNumber
            };

            logEntry.TimeStamp = DateTime.Now;
            service.CreateCommunicationLogEntry(logEntry);
        }
Пример #2
0
 protected virtual IFinanceService GetFinanceService()
 {
     return(ServiceUtilities.GetService <IFinanceService>(_context));
 }
 protected virtual IAuthenticationService GetAuthenticationService()
 {
     return(ServiceUtilities.GetService <IAuthenticationService>(context));
 }