Rock.CheckIn.CheckInPerson.SelectedGroupTypes C# (CSharp) Méthode

SelectedGroupTypes() public méthode

Returns the selected group types.
public SelectedGroupTypes ( CheckInSchedule currentSchedule ) : List
currentSchedule CheckInSchedule The current schedule.
Résultat List
        public List<CheckInGroupType> SelectedGroupTypes( CheckInSchedule currentSchedule )
        {
            return ( currentSchedule != null && currentSchedule.Schedule != null ) ?
                GroupTypes.Where( t => t.SelectedForSchedule.Contains( currentSchedule.Schedule.Id ) ).ToList() :
                GroupTypes.Where( t => t.Selected ).ToList();
        }

Usage Example

        /// <summary>
        /// Processes the selection.
        /// </summary>
        /// <param name="person">The person.</param>
        /// <param name="schedule">The schedule.</param>
        /// <returns></returns>
        protected bool ProcessSelection( CheckInPerson person, CheckInSchedule schedule )
        {
            if ( person != null )
            {
                if ( !ProcessSelection(
                    maWarning,
                    () => person.SelectedGroupTypes( schedule )
                        .SelectMany( t => t.SelectedGroups( schedule )
                            .SelectMany( g => g.SelectedLocations( schedule )
                                .SelectMany( l => l.ValidSchedules( schedule ) ) ) )
                        .Count() <= 0,
                    "<p>Sorry, based on your selection, there are currently not any available times that can be checked into.</p>",
                    CurrentCheckInState.CheckInType.TypeOfCheckin == TypeOfCheckin.Family ) )
                {
                    ClearSelection();
                }
                else
                {
                    return true;
                }
            }

            return false;
        }
All Usage Examples Of Rock.CheckIn.CheckInPerson::SelectedGroupTypes