コード例 #1
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="parentControl">The parent control.</param>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField parentControl)
        {
            // Define Control: Group Member Data View Picker
            var ddlDataView = new DataViewPicker();

            ddlDataView.ID    = parentControl.GetChildControlInstanceName(_CtlDataView);
            ddlDataView.Label = "Has Group Memberships in this Data View";
            ddlDataView.Help  = "A Group Member Data View that provides the set of possible Group Members.";
            parentControl.Controls.Add(ddlDataView);

            var ddlCompare = ComparisonHelper.ComparisonControl(CountComparisonTypesSpecifier, false);

            ddlCompare.Label = "where the number of matching Group Memberships is";
            ddlCompare.ID    = parentControl.GetChildControlInstanceName(_CtlComparison);
            ddlCompare.AddCssClass("js-filter-compare");
            parentControl.Controls.Add(ddlCompare);

            var nbCount = new NumberBox();

            nbCount.Label = "&nbsp;";
            nbCount.ID    = parentControl.GetChildControlInstanceName(_CtlMemberCount);
            nbCount.AddCssClass("js-filter-control js-member-count");
            nbCount.FieldName = "Membership Count";
            parentControl.Controls.Add(nbCount);

            // Populate the Data View Picker
            ddlDataView.EntityTypeId = EntityTypeCache.Read(typeof(Rock.Model.GroupMember)).Id;

            return(new Control[] { ddlDataView, ddlCompare, nbCount });
        }
コード例 #2
0
        /// <summary>
        /// Creates the model representation of the child controls used to display and edit the filter settings.
        /// </summary>
        /// <param name="entityType">The System Type of the entity to which the filter will be applied.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: Person Data View Picker
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID       = filterControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.CssClass = "js-data-view-picker";
            dvpDataView.Label    = "Contains People from this Data View";
            dvpDataView.Help     = "A Person Data View that provides the set of possible Group Members.";
            filterControl.Controls.Add(dvpDataView);

            var ddlCompare = ComparisonHelper.ComparisonControl(CountComparisonTypesSpecifier);

            ddlCompare.Label = "where the number of matching Group Members is";
            ddlCompare.ID    = filterControl.GetChildControlInstanceName(_CtlComparison);
            ddlCompare.AddCssClass("js-filter-compare");
            filterControl.Controls.Add(ddlCompare);

            var nbCount = new NumberBox();

            nbCount.Label = "&nbsp;";
            nbCount.ID    = filterControl.GetChildControlInstanceName(_CtlMemberCount);
            nbCount.AddCssClass("js-filter-control js-member-count");
            nbCount.FieldName = "Member Count";
            filterControl.Controls.Add(nbCount);

            // Populate the Data View Picker
            dvpDataView.EntityTypeId = EntityTypeCache.Get(typeof(Model.Person)).Id;

            return(new Control[] { dvpDataView, ddlCompare, nbCount });
        }
コード例 #3
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="parentControl">The parent control.</param>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField parentControl)
        {
            // Define Control: Location Type DropDown List
            var ddlLocationType = new RockDropDownList();

            ddlLocationType.ID    = parentControl.GetChildControlInstanceName(_CtlLocationType);
            ddlLocationType.Label = "Address Type";
            ddlLocationType.Help  = "Specifies the type of address the filter will be applied to. If no value is selected, all of the Person's addresses will be considered.";

            var familyLocations = GroupTypeCache.GetFamilyGroupType().LocationTypeValues.OrderBy(a => a.Order).ThenBy(a => a.Value);

            foreach (var value in familyLocations)
            {
                ddlLocationType.Items.Add(new ListItem(value.Value, value.Guid.ToString()));
            }

            ddlLocationType.Items.Insert(0, None.ListItem);

            parentControl.Controls.Add(ddlLocationType);

            // Define Control: Address Control
            var acAddress = new AddressControl();

            acAddress.ID    = parentControl.GetChildControlInstanceName(_CtlLocationAddress);
            acAddress.Label = "Address";
            acAddress.Help  = "All or part of an address to which the Person is associated.";
            acAddress.AddCssClass("js-addresscontrol");
            parentControl.Controls.Add(acAddress);

            return(new Control[] { acAddress, ddlLocationType });
        }
コード例 #4
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            var cblNoteTypes = new RockListBox();

            cblNoteTypes.ID       = filterControl.GetChildControlInstanceName(_CtlNoteTypes);
            cblNoteTypes.CssClass = "js-notetypes";
            cblNoteTypes.Label    = "Note Types";
            cblNoteTypes.Help     = "The type of note to filter by. Leave blank to include all note types.";
            filterControl.Controls.Add(cblNoteTypes);

            var noteTypeService    = new NoteTypeService(new RockContext());
            var entityTypeIdPerson = EntityTypeCache.GetId <Rock.Model.Person>();
            var noteTypes          = noteTypeService.Queryable().Where(a => a.EntityTypeId == entityTypeIdPerson)
                                     .OrderBy(a => a.Order)
                                     .ThenBy(a => a.Name)
                                     .Select(a => new
            {
                a.Id,
                a.Name
            }).ToList();

            cblNoteTypes.Items.Clear();
            cblNoteTypes.Items.AddRange(noteTypes.Select(a => new ListItem(a.Name, a.Id.ToString())).ToArray());

            var slidingDateRangePicker = new SlidingDateRangePicker();

            slidingDateRangePicker.ID = filterControl.GetChildControlInstanceName(_CtlSlidingDateRangePicker);
            slidingDateRangePicker.AddCssClass("js-sliding-date-range");
            slidingDateRangePicker.Label    = "Date Range";
            slidingDateRangePicker.Help     = "The date range that the note was created during.";
            slidingDateRangePicker.Required = false;
            filterControl.Controls.Add(slidingDateRangePicker);

            var nbMinimumCount = new NumberBox();

            nbMinimumCount.ID           = filterControl.GetChildControlInstanceName(_CtlMinimumCount);
            nbMinimumCount.NumberType   = ValidationDataType.Integer;
            nbMinimumCount.MinimumValue = "1";
            nbMinimumCount.Label        = "Minimum Count";
            nbMinimumCount.Help         = "The minimum number of notes created during the date range to be considered a match.";
            nbMinimumCount.Required     = true;
            nbMinimumCount.AddCssClass("js-minimum-count");
            filterControl.Controls.Add(nbMinimumCount);

            return(new System.Web.UI.Control[3] {
                cblNoteTypes, slidingDateRangePicker, nbMinimumCount
            });
        }
コード例 #5
0
        /// <summary>
        /// Creates the model representation of the child controls used to display and edit the filter settings.
        /// Implement this version of CreateChildControls if your DataFilterComponent works the same in all filter modes
        /// </summary>
        /// <param name="entityType">The System Type of the entity to which the filter will be applied.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            var pnlGroupAttributeFilterControls = new Panel();

            pnlGroupAttributeFilterControls.ViewStateMode = ViewStateMode.Disabled;
            pnlGroupAttributeFilterControls.ID            = filterControl.GetChildControlInstanceName(_CtlGroup);
            filterControl.Controls.Add(pnlGroupAttributeFilterControls);

            pnlGroupAttributeFilterControls.Controls.Clear();

            // Create the field selection dropdown
            var ddlProperty = new RockDropDownList();

            ddlProperty.ID = pnlGroupAttributeFilterControls.GetChildControlInstanceName(_CtlProperty);

            pnlGroupAttributeFilterControls.Controls.Add(ddlProperty);

            // Add empty selection as first item.
            ddlProperty.Items.Add(new ListItem());

            foreach (var entityField in GetGroupMemberAttributes())
            {
                string controlId = pnlGroupAttributeFilterControls.GetChildControlInstanceName(entityField.Name);
                var    control   = entityField.FieldType.Field.FilterControl(entityField.FieldConfig, controlId, true);
                if (control != null)
                {
                    // Add the field to the dropdown of available fields
                    ddlProperty.Items.Add(new ListItem(entityField.Title, entityField.Name));
                    pnlGroupAttributeFilterControls.Controls.Add(control);
                }
            }

            return(new Control[] { pnlGroupAttributeFilterControls });
        }
コード例 #6
0
        /// <summary>
        /// Creates the model representation of the child controls used to display and edit the filter settings.
        /// Implement this version of CreateChildControls if your DataFilterComponent works the same in all filter modes
        /// </summary>
        /// <param name="entityType">The System Type of the entity to which the filter will be applied.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: Group Data View Picker
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID       = filterControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.CssClass = "js-data-view-picker";
            dvpDataView.Label    = "Is Member of Group from Data View";
            dvpDataView.Help     = "A Data View that filters the Groups included in the result. If no value is selected, any Groups that would be visible in a Group List will be included.";
            filterControl.Controls.Add(dvpDataView);

            // Define Control: Group Member Status DropDown List
            var ddlGroupMemberStatus = new RockDropDownList();

            ddlGroupMemberStatus.ID       = filterControl.GetChildControlInstanceName(_CtlGroupStatus);
            ddlGroupMemberStatus.CssClass = "js-group-member-status";
            ddlGroupMemberStatus.Label    = "with Group Member Status";
            ddlGroupMemberStatus.Help     = "Specifies the Status the Member must have to be included in the result. If no value is selected, Members of every Group Status will be shown.";
            ddlGroupMemberStatus.BindToEnum <GroupMemberStatus>(true);
            ddlGroupMemberStatus.SetValue(GroupMemberStatus.Active.ConvertToInt());
            filterControl.Controls.Add(ddlGroupMemberStatus);

            // Define Control: Role Type DropDown List
            var ddlRoleType = new RockDropDownList();

            ddlRoleType.ID       = filterControl.GetChildControlInstanceName(_CtlRoleType);
            ddlRoleType.CssClass = "js-group-member-role";
            ddlRoleType.Label    = "with Group Role Type";
            ddlRoleType.Help     = "Specifies the type of Group Role the Member must have to be included in the result. If no value is selected, Members in every Role will be shown.";
            ddlRoleType.Items.Add(new ListItem(string.Empty, RoleTypeSpecifier.Any.ToString()));
            ddlRoleType.Items.Add(new ListItem("Leader", RoleTypeSpecifier.Leader.ToString()));
            ddlRoleType.Items.Add(new ListItem("Member", RoleTypeSpecifier.Member.ToString()));
            filterControl.Controls.Add(ddlRoleType);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(Model.Group)).Id;

            dvpDataView.EntityTypeId = entityTypeId;

            return(new Control[] { dvpDataView, ddlGroupMemberStatus, ddlRoleType });
        }
コード例 #7
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="parentControl">The parent control.</param>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField parentControl)
        {
            // Define Control: Location Data View Picker
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID       = parentControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.CssClass = "js-data-view-picker";
            dvpDataView.Label    = "Connected to Locations";
            dvpDataView.Help     = "A Data View that provides the list of Locations to which the Person may be connected.";

            parentControl.Controls.Add(dvpDataView);

            // Define Control: Location Type DropDown List
            var ddlLocationType = new RockDropDownList();

            ddlLocationType.ID       = parentControl.GetChildControlInstanceName(_CtlLocationType);
            ddlLocationType.CssClass = "js-location-type-picker";
            ddlLocationType.Label    = "Address Type";
            ddlLocationType.Help     = "Specifies the type of Address the filter will be applied to. If no value is selected, all of the Person's Addresses will be considered.";

            var familyLocations = GroupTypeCache.GetFamilyGroupType().LocationTypeValues.OrderBy(a => a.Order).ThenBy(a => a.Value);

            foreach (var value in familyLocations)
            {
                ddlLocationType.Items.Add(new ListItem(value.Value, value.Guid.ToString()));
            }

            ddlLocationType.Items.Insert(0, None.ListItem);

            parentControl.Controls.Add(ddlLocationType);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(Location)).Id;

            dvpDataView.EntityTypeId = entityTypeId;

            return(new Control[] { dvpDataView, ddlLocationType });
        }
コード例 #8
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            var tbCommunicationId = new NumberBox();

            tbCommunicationId.Label      = "Communication Id";
            tbCommunicationId.ID         = filterControl.GetChildControlInstanceName(_CtlCommunicationId);
            tbCommunicationId.CssClass   = "js-communicationId";
            tbCommunicationId.Required   = true;
            tbCommunicationId.NumberType = ValidationDataType.Integer;
            filterControl.Controls.Add(tbCommunicationId);

            // Define Control: Communication Status DropDown List
            var ddlCommunicationStatus = new RockDropDownList();

            ddlCommunicationStatus.ID       = filterControl.GetChildControlInstanceName(_CtlCommunicationStatus);
            ddlCommunicationStatus.Label    = "Communication Status";
            ddlCommunicationStatus.Help     = "Specifies the type of Communication Status that the recipient must have to be included in the result.";
            ddlCommunicationStatus.Required = true;
            ddlCommunicationStatus.AddCssClass("js-filter-status");
            ddlCommunicationStatus.BindToEnum <CommunicationStatusType>();
            filterControl.Controls.Add(ddlCommunicationStatus);

            return(new Control[] { tbCommunicationId, ddlCommunicationStatus });
        }
コード例 #9
0
        /// <summary>
        /// Creates the model representation of the child controls used to display and edit the filter settings.
        /// </summary>
        /// <param name="entityType">The System Type of the entity to which the filter will be applied.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: Person Data View Picker
            var ddlDataView = new DataViewPicker();

            ddlDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            ddlDataView.Label = "Represents People from this Data View";
            ddlDataView.Help  = "A Person Data View that represents the set of possible Group Members.";
            filterControl.Controls.Add(ddlDataView);

            // Populate the Data View Picker
            ddlDataView.EntityTypeId = EntityTypeCache.Read(typeof(Rock.Model.Person)).Id;

            return(new Control[] { ddlDataView });
        }
コード例 #10
0
        /// <summary>
        /// Creates the model representation of the child controls used to display and edit the filter settings.
        /// Implement this version of CreateChildControls if your DataFilterComponent works the same in all filter modes
        /// </summary>
        /// <param name="entityType">The System Type of the entity to which the filter will be applied.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: Group Data View Picker
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.Label = "Is Member of Group from Data View";
            dvpDataView.Help  = "A Data View that filters the Groups included in the result. If no value is selected, any Groups that would be visible in a Group List will be included.";
            filterControl.Controls.Add(dvpDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(Model.Group)).Id;

            dvpDataView.EntityTypeId = entityTypeId;

            return(new Control[] { dvpDataView });
        }
コード例 #11
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            var ddlDataView = new DataViewPicker();

            ddlDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            ddlDataView.Label = "Has a Person in this Data View";
            ddlDataView.Help  = "A Data View that provides the set of Person to match.";

            filterControl.Controls.Add(ddlDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Read(typeof(Model.FinancialTransaction)).Id;

            ddlDataView.EntityTypeId = entityTypeId;

            return(new Control[] { ddlDataView });
        }
コード例 #12
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.Label = "Has Benevolence Result in this Data View";
            dvpDataView.Help  = "A Data View that provides the set of Benevolence Result to match.";

            filterControl.Controls.Add(dvpDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(Model.BenevolenceResult)).Id;

            dvpDataView.EntityTypeId = entityTypeId;

            return(new Control[] { dvpDataView });
        }
コード例 #13
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: Data View Picker
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.Label = "In Step Data View";
            dvpDataView.Help  = "A Step Data View that provides the set of possible step participants.";

            filterControl.Controls.Add(dvpDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(Model.Step)).Id;

            dvpDataView.EntityTypeId = entityTypeId;

            return(new Control[] { dvpDataView });
        }
コード例 #14
0
        /// <summary>
        /// Creates the model representation of the child controls used to display and edit the filter settings.
        /// Implement this version of CreateChildControls if your DataFilterComponent works the same in all filter modes
        /// </summary>
        /// <param name="entityType">The System Type of the entity to which the filter will be applied.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: History Data View Picker
            var ddlDataView = new DataViewPicker();

            ddlDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            ddlDataView.Label = "Connected to History Records";
            ddlDataView.Help  = "A Data View that provides the set of History items to which the Person may be connected, either because the history is attached to their record or it affected them in some way.";

            filterControl.Controls.Add(ddlDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Read(typeof(History)).Id;

            ddlDataView.EntityTypeId = entityTypeId;

            return(new Control[] { ddlDataView });
        }
コード例 #15
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: Person Device Data View Picker
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.Label = "In Personal Device Data View";
            dvpDataView.Help  = "A Personal Device Data View that provides the set of possible people with personal devices.";

            filterControl.Controls.Add(dvpDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(Model.PersonalDevice)).Id;

            dvpDataView.EntityTypeId = entityTypeId;

            return(new Control[] { dvpDataView });
        }
コード例 #16
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: History Data View Picker
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.Label = "Has a Group Type in this Data View";
            dvpDataView.Help  = "A Data View that provides the set of Group Types to match.";

            filterControl.Controls.Add(dvpDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(GroupType)).Id;

            dvpDataView.EntityTypeId = entityTypeId;

            return(new Control[] { dvpDataView });
        }
コード例 #17
0
        /// <summary>
        /// Creates the model representation of the child controls used to display and edit the filter settings.
        /// Implement this version of CreateChildControls if your DataFilterComponent works the same in all filter modes
        /// </summary>
        /// <param name="entityType">The System Type of the entity to which the filter will be applied.</param>
        /// <param name="filterControl">The control that serves as the container for the filter controls.</param>
        /// <returns>
        /// The array of new controls created to implement the filter.
        /// </returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: Person Data View Picker
            var dvpDataView = new DataViewItemPicker();

            dvpDataView.ID       = filterControl.GetChildControlInstanceName(_CtlDataView);
            dvpDataView.CssClass = "js-data-view-picker";
            dvpDataView.Label    = "People from Data View";
            dvpDataView.Help     = "A Data View that filters the People included in the result.";
            filterControl.Controls.Add(dvpDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(Model.Person)).Id;

            dvpDataView.EntityTypeId = entityTypeId;

            return(new Control[] { dvpDataView });
        }
コード例 #18
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="parentControl">The parent control.</param>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField parentControl)
        {
            var ddlDataView = new DataViewItemPicker();

            ddlDataView.ID       = parentControl.GetChildControlInstanceName(_CtlDataView);
            ddlDataView.CssClass = "js-data-view-picker";

            parentControl.Controls.Add(ddlDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(TRelatedEntity)).Id;

            ddlDataView.EntityTypeId = entityTypeId;

            this.OnConfigureDataViewItemPicker(ddlDataView);

            return(new Control[] { ddlDataView });
        }
コード例 #19
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField filterControl)
        {
            // Define Control: History Data View Picker
            var ddlDataView = new DataViewPicker();

            ddlDataView.ID    = filterControl.GetChildControlInstanceName(_CtlDataView);
            ddlDataView.Label = "In User Login DataView";
            ddlDataView.Help  = "A User Login Data View that provides the set of possible users.";

            filterControl.Controls.Add(ddlDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Read(typeof(Model.UserLogin)).Id;

            ddlDataView.EntityTypeId = entityTypeId;

            return(new Control[] { ddlDataView });
        }
コード例 #20
0
        /// <summary>
        /// Creates the child controls.
        /// </summary>
        /// <param name="entityType">Type of the entity.</param>
        /// <param name="parentControl">The parent control.</param>
        /// <returns></returns>
        public override Control[] CreateChildControls(Type entityType, FilterField parentControl)
        {
            var ddlDataView = new DataViewItemPicker();

            ddlDataView.ID       = parentControl.GetChildControlInstanceName(_CtlDataView);
            ddlDataView.CssClass = "js-data-view-picker";

            // Set placeholder values for Label and Help text.
            // These properties should be customised by overriding the OnConfigureDataViewItemPicker method in the derived class.
            ddlDataView.Label = "Is related to one of the items in this Data View";
            ddlDataView.Help  = "A Data View that provides the list of related items to which an item in the result set may be connected.";

            parentControl.Controls.Add(ddlDataView);

            // Populate the Data View Picker
            int entityTypeId = EntityTypeCache.Get(typeof(TRelatedEntity)).Id;

            ddlDataView.EntityTypeId = entityTypeId;

            this.OnConfigureDataViewItemPicker(ddlDataView);

            return(new Control[] { ddlDataView });
        }