Exemplo n.º 1
0
        public static NotificationDTO Map(MessageNotificationBO messageNotification, IZeus zeus)
        {
            NotificationDTO self = new NotificationDTO();

            self.FontAwesome = "fa fa-envelope-o";

            return(self);
        }
Exemplo n.º 2
0
 //mark messages as seen & async
 public async Task SeenAsync(MessageNotificationBO messageNotification)
 {
     if (messageNotification != null)
     {
         messageNotification.NotificationState = Entity.Enums.NotificationState.Seen;
         await UpdateAsync(messageNotification);
     }
 }
Exemplo n.º 3
0
 public async Task UpdateAsync(MessageNotificationBO messageNotification)
 {
     if (messageNotification != null)
     {
         db.messageNotificationRepository.Edit(messageNotification);
         await unitofWork.CommitAsync();
     }
 }
Exemplo n.º 4
0
        public async Task ReadAsync(MessageNotificationBO messageNotification)
        {
            if (messageNotification != null)
            {
                messageNotification.NotificationState = Entity.Enums.NotificationState.Read;
                messageNotification.ReadDate          = DateTime.UtcNow;

                await UpdateAsync(messageNotification);
            }
        }
Exemplo n.º 5
0
        public void Read(MessageNotificationBO messageNotification)
        {
            if (messageNotification != null)
            {
                messageNotification.NotificationState = Entity.Enums.NotificationState.Read;
                messageNotification.ReadDate          = DateTime.UtcNow;

                Update(messageNotification);
            }
        }
Exemplo n.º 6
0
 public virtual void Add(MessageNotificationBO messageNotification)
 {
     if (messageNotification == null)
     {
         throw new ArgumentNullException("messageNotification", "Message Notification is null");
     }
     else
     {
         db.messageNotificationRepository.Add(messageNotification);
         unitofWork.Commit();
     }
 }
Exemplo n.º 7
0
 public async Task AddAsync(MessageNotificationBO messageNotification)
 {
     if (messageNotification == null)
     {
         throw new ArgumentNullException("messageNotification", "Message Notification is null");
     }
     else
     {
         db.messageNotificationRepository.Add(messageNotification);
         await unitofWork.CommitAsync();
     }
 }
Exemplo n.º 8
0
 public virtual void Delete(MessageNotificationBO messageNotification, bool purge = false)
 {
     if (purge)
     {
         db.messageNotificationRepository.Delete(messageNotification);
         unitofWork.Commit();
     }
     else
     {
         messageNotification.Audit.RecordState = Entity.Enums.RecordStateType.InActive;
         Update(messageNotification);
     }
 }