コード例 #1
0
        public ICollection<NotificationWrapper> GetNotificationsForUser(UserWrapper user, int numberOfVisibleNotifications)
        {
            if (user == null)
            {
                return new List<NotificationWrapper>();
            }

            var notificationAccess = new NotificationAccess();
            var result = notificationAccess.GetNotificationsForUser(user);

            if (numberOfVisibleNotifications < 0)
            {
                return result.ToList();
            }
            return result.Take(numberOfVisibleNotifications).ToList();
        }
コード例 #2
0
 public void MarkNotificationAsRead(UserWrapper userWrapper, int responseId)
 {
     NotificationAccess na=new NotificationAccess();
     na.MarkNotificationAsRead(userWrapper, responseId);
 }
コード例 #3
0
 public int GetNumberOfUnreadNotifications(UserWrapper userWrapper)
 {
     NotificationAccess ua = new NotificationAccess();
     return ua.GetNumberOfUnreadNotifications(userWrapper);
 }