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