Ejemplo n.º 1
0
        public NotificationSendLogRow CreateNotificationMessage(Notification notification,
                                                                 string composedContent,
                                                                 string composedSubject,
                                                                 NotificationRecipient rec,
                                                                 NotificationMessageTemplateTypeDictionary notificationMessageTemplateType,
                                                                 Guid tryGroupId)
        {
            var status = SendStatusDictionary.ErrorOnCompose;
            string sendedSubject = "";
            string sendedContent = "";

            if (composedContent != null && composedSubject != null)
            {
                status = SendStatusDictionary.NeedToSend;
                sendedSubject = composedSubject;
                sendedContent = composedContent;
            }

            var rez = new NotificationSendLogRow
            {
                Notification = notification,
                Recipient = rec,
                SendDateTime = DateTime.Now,
                SendTryGroupId = tryGroupId,
                SendType = notificationMessageTemplateType,
                SendStatus = status,
                SendedSubject = sendedSubject,
                SendedContent = sendedContent,
            };
            return rez;
        }
Ejemplo n.º 2
0
 public bool needToLogComposeError(Guid notificationId, Guid recipientId, NotificationMessageTemplateTypeDictionary expectedMessageType)
 {
     return Uow.NotificationSendLog.NeedToLogComposeError(notificationId, recipientId, expectedMessageType);
 }
Ejemplo n.º 3
0
 public IEnumerable<NotificationSendLogRow> GetNotificationMessagesNeedtoSendByType(NotificationMessageTemplateTypeDictionary type, int heapSize)
 {
     return Uow.NotificationSendLog.GetNeedtoSendByType(type, heapSize);
 }
Ejemplo n.º 4
0
 public IEnumerable<NotificationSendLogRow> GetNotificationSendTries(Guid notificationId, NotificationMessageTemplateTypeDictionary? sendType = null, SendStatusDictionary sendStatus = SendStatusDictionary.NeedToSend)
 {
     return Uow.NotificationSendLog.GetByNotificationId(notificationId,
                                                        sendType,
                                                        sendStatus);
 }
Ejemplo n.º 5
0
 public NotificationMessageTemplate GetActiveNotificationMessageTemplateBytype(Guid notificationTemplateId, NotificationMessageTemplateTypeDictionary messageTemplateType)
 {
     return Uow.NotificationMessageTemplates.GetActiveNotificationMessageTemplateBytype(notificationTemplateId, messageTemplateType);
 }