Пример #1
0
        public static List <ParticipantBlock> GetParticipants(SessionBlock session)
        {
            List <ParticipantBlock> sessionParticipants = new List <ParticipantBlock>();
            int sessionID         = (session as IContent).ContentLink.ID;
            var eventParticipants = AttendRegistrationEngine.GetParticipants(session.EventPage);

            foreach (ParticipantBlock participant in eventParticipants)
            {
                if (participant.Sessions != null && participant.Sessions.Items != null && participant.Sessions.Items.Count > 0)
                {
                    if ((from s in participant.Sessions.Items where s.ContentLink.ID == sessionID select s.ContentLink.ID).Any <int>())
                    {
                        sessionParticipants.Add(participant);
                    }
                }
            }
            return(sessionParticipants);
        }
Пример #2
0
        public static List <IParticipant> GetParticipantsForScheduledEmail(ScheduledEmailBlock scheduledEmailBlock)
        {
            List <IParticipant> participants = new List <IParticipant>();
            Hashtable           statuses     = new Hashtable();

            if (scheduledEmailBlock.AttendStatusFilter != null)
            {
                foreach (string status in scheduledEmailBlock.AttendStatusFilter.Split(','))
                {
                    statuses.Add(status, status);
                }
            }
            if (scheduledEmailBlock.EventPage != null)
            {
                foreach (var participant in AttendRegistrationEngine.GetParticipants(scheduledEmailBlock.EventPage))
                {
                    if (scheduledEmailBlock.AttendStatusFilter == null || statuses.Contains(participant.AttendStatus))
                    {
                        participants.Add(participant);
                    }
                }
            }
            return(participants);
        }