示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (StopProcessing)
        {
            ucType.Visible = false;
            return;
        }

        if (!String.IsNullOrEmpty(CssClass))
        {
            ucType.AdditionalDropDownCSSClass = CssClass;
        }
        ucType.AllowAll = ShowAll;

        var condition = new WhereCondition();

        if (CurrentSite.SiteIsContentOnly)
        {
            condition.WhereFalse("ActivityTypeIsHiddenInContentOnly");
        }
        if (ShowCustomActivitiesOnly)
        {
            condition.WhereTrue("ActivityTypeIsCustom");
        }
        if (ShowManuallyCreatableActivities)
        {
            condition.WhereTrue("ActivityTypeManualCreationAllowed");
        }
        if (ShowEnabledActivitiesOnly)
        {
            condition.WhereTrue("ActivityTypeEnabled");
        }

        ucType.WhereCondition      = condition.ToString(true);
        ucType.OnSelectionChanged += new EventHandler(DropDownSingleSelect_SelectedIndexChanged);
    }