Ejemplo n.º 1
0
        public IEnumerable<NotificationWrapper> GetNotificationsForUser(UserWrapper user)
        {
            NotificationTableAdapter adapter = new NotificationTableAdapter();
            DBDataSet.NotificationDataTable res = adapter.GetData(user.UserID);

            return res.Select(not => new NotificationWrapper()
                {
                    UserID = not.UserID,
                    UnitCode = not.UnitCode,
                    Comment = not.Comment,
                    FirstName = not.FirstName,
                    IsRead = not.IsRead,
                    LastName = not.LastName,
                    Rating = not.Rating,
                    ResponseId = not.ResponseId,
                    Time = not.Time
                });
        }