예제 #1
0
        /// <summary>
        /// Gets the selection.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="controls">The controls.</param>
        /// <returns></returns>
        public override string GetSelection( Type entityType, Control[] controls )
        {
            var pGroupPicker = controls[0] as GroupPicker;
            var cbChildGroups = controls[1] as RockCheckBox;
            var ddlIntegerCompare = controls[2] as DropDownList;
            var tbAttendedCount = controls[3] as RockTextBox;
            var slidingDateRangePicker = controls[4] as SlidingDateRangePicker;

            // convert the date range from pipe-delimited to comma since we use pipe delimited for the selection values
            var dateRangeCommaDelimitedValues = slidingDateRangePicker.DelimitedValues.Replace( '|', ',' );
            var groupGuids = new GroupService( new RockContext() ).GetByIds( pGroupPicker.ItemIds.AsIntegerList() ).Select( a => a.Guid ).ToList();
            return string.Format( "{0}|{1}|{2}|{3}|{4}", groupGuids.AsDelimited( "," ), ddlIntegerCompare.SelectedValue, tbAttendedCount.Text, dateRangeCommaDelimitedValues, cbChildGroups.Checked.ToTrueFalse() );
        }
예제 #2
0
        /// <summary>
        /// Gets the selection.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="controls">The controls.</param>
        /// <returns></returns>
        public override string GetSelection( Type entityType, Control[] controls )
        {
            if ( controls.Count() < 8 )
            {
                return null;
            }

            GroupPicker groupPicker = controls[0] as GroupPicker;
            RockCheckBox cbChildGroups = controls[1] as RockCheckBox;
            RockCheckBox cbIncludeSelectedGroup = controls[2] as RockCheckBox;
            RockCheckBox cbChildGroupsPlusDescendants = controls[3] as RockCheckBox;
            RockCheckBoxList cblRoles = controls[4] as RockCheckBoxList;
            RockDropDownList ddlGroupMemberStatus = controls[5] as RockDropDownList;
            RockCheckBox cbInactiveGroups = controls[6] as RockCheckBox;
            SlidingDateRangePicker addedOnDateRangePicker = controls[7] as SlidingDateRangePicker;

            List<int> groupIdList = groupPicker.SelectedValues.AsIntegerList();
            var groupGuids = new GroupService( new RockContext() ).GetByIds( groupIdList ).Select( a => a.Guid ).Distinct().ToList();

            // convert pipe to comma delimited
            var delimitedValues = addedOnDateRangePicker.DelimitedValues.Replace( "|", "," );

            return string.Format(
                "{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}",
                groupGuids.AsDelimited( "," ),
                cblRoles.SelectedValues.AsDelimited( "," ),
                cbChildGroups.Checked.ToString(),
                ddlGroupMemberStatus.SelectedValue,
                cbIncludeSelectedGroup.Checked.ToString(),
                cbChildGroupsPlusDescendants.Checked.ToString(),
                cbIncludeInactiveGroups.Checked.ToString(),
                delimitedValues );
        }
예제 #3
0
        /// <summary>
        /// Gets the selection.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="controls">The controls.</param>
        /// <returns></returns>
        public override string GetSelection( Type entityType, Control[] controls )
        {
            if ( controls.Count() < 6 )
            {
                return null;
            }

            GroupPicker groupPicker = controls[0] as GroupPicker;
            RockCheckBox cbChildGroups = controls[1] as RockCheckBox;
            RockCheckBox cbIncludeSelectedGroup = controls[2] as RockCheckBox;
            RockCheckBox cbChildGroupsPlusDescendants = controls[3] as RockCheckBox;
            RockCheckBoxList cblRoles = controls[4] as RockCheckBoxList;
            RockDropDownList ddlGroupMemberStatus = controls[5] as RockDropDownList;

            List<int> groupIdList = groupPicker.SelectedValues.AsIntegerList();
            var groupGuids = new GroupService( new RockContext() ).GetByIds( groupIdList ).Select( a => a.Guid ).Distinct().ToList();

            return string.Format(
                "{0}|{1}|{2}|{3}|{4}|{5}",
                groupGuids.AsDelimited( "," ),
                cblRoles.SelectedValues.AsDelimited( "," ),
                cbChildGroups.Checked.ToString(),
                ddlGroupMemberStatus.SelectedValue,
                cbIncludeSelectedGroup.Checked.ToString(),
                cbChildGroupsPlusDescendants.Checked.ToString() );
        }