예제 #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;
        }
예제 #2
0
 public bool needToLogComposeError(Guid notificationId, Guid recipientId, NotificationMessageTemplateTypeDictionary expectedMessageType)
 {
     return Uow.NotificationSendLog.NeedToLogComposeError(notificationId, recipientId, expectedMessageType);
 }
예제 #3
0
 public IEnumerable<NotificationSendLogRow> GetNotificationMessagesNeedtoSendByType(NotificationMessageTemplateTypeDictionary type, int heapSize)
 {
     return Uow.NotificationSendLog.GetNeedtoSendByType(type, heapSize);
 }
예제 #4
0
 public IEnumerable<NotificationSendLogRow> GetNotificationSendTries(Guid notificationId, NotificationMessageTemplateTypeDictionary? sendType = null, SendStatusDictionary sendStatus = SendStatusDictionary.NeedToSend)
 {
     return Uow.NotificationSendLog.GetByNotificationId(notificationId,
                                                        sendType,
                                                        sendStatus);
 }
예제 #5
0
 public NotificationMessageTemplate GetActiveNotificationMessageTemplateBytype(Guid notificationTemplateId, NotificationMessageTemplateTypeDictionary messageTemplateType)
 {
     return Uow.NotificationMessageTemplates.GetActiveNotificationMessageTemplateBytype(notificationTemplateId, messageTemplateType);
 }