/// <summary>
    /// Resets all boxes.
    /// </summary>
    public void LoadControls()
    {
        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(ItemID);

        // If we are editing existing search index
        if (sii != null)
        {
            SearchIndexSettings sis = new SearchIndexSettings();
            sis.LoadData(sii.IndexSettings.GetData());
            SearchIndexSettingsInfo sisi = sis.GetSearchIndexSettingsInfo(ItemGUID);
            if (sisi != null)
            {
                selectClassnames.Value = sisi.ClassNames;
                selectpath.Value       = sisi.Path;
                ItemType = sisi.Type;

                if (sisi.Type == SearchIndexSettingsInfo.TYPE_ALLOWED)
                {
                    chkInclForums.Checked = sisi.IncludeForums;
                    chkInclBlog.Checked   = sisi.IncludeBlogs;
                    chkInclBoards.Checked = sisi.IncludeMessageCommunication;
                    chkInclCats.Checked   = sisi.IncludeCategories;
                    chkInclAtt.Checked    = sisi.IncludeAttachments;
                }
            }
        }

        // Hide appropriate controls for excluded item
        if ((ItemType == SearchIndexSettingsInfo.TYPE_EXLUDED) || ((sii != null) && (sii.IndexType == SearchHelper.DOCUMENTS_CRAWLER_INDEX)))
        {
            pnlAllowed.Visible = false;
        }
    }
コード例 #2
0
    /// <summary>
    /// Resets all boxes.
    /// </summary>
    public void LoadControls()
    {
        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(this.ItemID);

        // If we are editing existing search index
        if (sii != null)
        {
            SearchIndexSettings sis = new SearchIndexSettings();
            sis.LoadData(sii.IndexSettings.GetData());
            SearchIndexSettingsInfo sisi = sis.GetSearchIndexSettingsInfo(this.ItemGUID);
            if (sisi != null)
            {
                if (!RequestHelper.IsPostBack())
                {
                    selSite.Value = sisi.SiteName;
                    selForum.SetValue("SiteName", sisi.SiteName);
                    selForum.Value = sisi.ForumNames;
                }
                this.ItemType = sisi.Type;
            }
        }

        plcForumsInfo.Visible = true;
        if (this.ItemType == SearchIndexSettingsInfo.TYPE_EXLUDED)
        {
            plcForumsInfo.Visible = false;
        }
    }
コード例 #3
0
    /// <summary>
    /// Resets all boxes.
    /// </summary>
    public void LoadControls()
    {
        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(ItemID);

        // If we are editing existing search index
        if (sii != null)
        {
            SearchIndexSettings sis = new SearchIndexSettings();
            sis.LoadData(sii.IndexSettings.GetData());
            SearchIndexSettingsInfo sisi = sis.GetSearchIndexSettingsInfo(ItemGUID);
            if (sisi != null)
            {
                if (!RequestHelper.IsPostBack())
                {
                    selSite.Value = sisi.SiteName;
                    selForum.SetValue("SiteName", sisi.SiteName);
                    selForum.Value = sisi.ForumNames;
                }
                ItemType = sisi.Type;
            }
        }

        plcForumsInfo.Visible = true;
        if (ItemType == SearchIndexSettingsInfo.TYPE_EXLUDED)
        {
            plcForumsInfo.Visible = false;
        }
    }
コード例 #4
0
    /// <summary>
    /// Resets all boxes.
    /// </summary>
    public void LoadControls()
    {
        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(ItemID);

        // If we are editing existing search index
        if (sii != null)
        {
            SearchIndexSettings sis = new SearchIndexSettings();
            sis.LoadData(sii.IndexSettings.GetData());
            SearchIndexSettingsInfo sisi = sis.GetSearchIndexSettingsInfo(ItemGUID);
            if (sisi != null)
            {
                selectClassnames.Value = sisi.ClassNames;
                selectpath.Value = sisi.Path;
                ItemType = sisi.Type;

                if (sisi.Type == SearchIndexSettingsInfo.TYPE_ALLOWED)
                {
                    chkInclForums.Checked = sisi.IncludeForums;
                    chkInclBlog.Checked = sisi.IncludeBlogs;
                    chkInclBoards.Checked = sisi.IncludeMessageCommunication;
                    chkInclCats.Checked = sisi.IncludeCategories;
                }
            }
        }

        // Hide appropriate controls for excluded item
        if ((ItemType == SearchIndexSettingsInfo.TYPE_EXLUDED) || ((sii != null) && (sii.IndexType == SearchHelper.DOCUMENTS_CRAWLER_INDEX)))
        {
            pnlAllowed.Visible = false;
        }
    }
コード例 #5
0
    /// <summary>
    /// Resets all boxes.
    /// </summary>
    public void LoadControls()
    {
        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(this.ItemID);

        // If we are editing existing search index
        if (sii != null)
        {
            SearchIndexSettings sis = new SearchIndexSettings();
            sis.LoadData(sii.IndexSettings.GetData());
            SearchIndexSettingsInfo sisi = sis.GetSearchIndexSettingsInfo(this.ItemGUID);
            if (sisi != null)
            {
                customTableSelector.Value = sisi.ClassNames;
                txtWhere.TextArea.Text    = sisi.WhereCondition;
            }
        }
    }
    /// <summary>
    /// Resets all boxes.
    /// </summary>
    public void LoadControls()
    {
        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(ItemID);

        // If we are editing existing search index
        if (sii != null)
        {
            SearchIndexSettings sis = new SearchIndexSettings();
            sis.LoadData(sii.IndexSettings.GetData());
            SearchIndexSettingsInfo sisi = sis.GetSearchIndexSettingsInfo(ItemGUID);
            if (sisi != null)
            {
                customTableSelector.Value = sisi.ClassNames;
                txtWhere.TextArea.Text = sisi.WhereCondition;
            }
        }
    }
コード例 #7
0
    /// <summary>
    /// Resets all boxes.
    /// </summary>
    public void LoadControls()
    {
        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(ItemID);

        string siteWhere = String.Empty;

        // Load only those site to which the index is assigned
        var siteIDs = SearchIndexSiteInfoProvider.GetIndexSiteBindings(ItemID).Column("IndexSiteID").Select(X => X.IndexSiteID.ToString()).ToList();

        if (siteIDs.Count > 0)
        {
            siteWhere = SqlHelper.GetWhereCondition <string>("SiteID", siteIDs, false);

            // Preselect current site if it is assigned to index
            if (!RequestHelper.IsPostBack() && siteIDs.Contains(SiteContext.CurrentSiteID.ToString()))
            {
                selSite.Value = SiteContext.CurrentSiteName;
            }

            selSite.UniSelector.WhereCondition = siteWhere;
            selSite.Reload(false);
        }
        else
        {
            pnlForm.Visible = false;

            ShowError(GetString("srch.index.nositeselected"));
        }

        // If we are editing existing search index
        if (sii != null)
        {
            SearchIndexSettings sis = new SearchIndexSettings();
            sis.LoadData(sii.IndexSettings.GetData());
            SearchIndexSettingsInfo sisi = sis.GetSearchIndexSettingsInfo(ItemGUID);
            if (sisi != null)
            {
                selectForm.Value       = ValidationHelper.GetString(sisi.GetValue("FormName"), "");
                txtWhere.TextArea.Text = sisi.WhereCondition;
                selSite.Value          = sisi.SiteName;
            }
        }

        // Init controls
        SetControlsStatus(false);
    }
    /// <summary>
    /// Resets all boxes.
    /// </summary>
    public void LoadControls()
    {
        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(ItemID);

        string siteWhere = String.Empty;

        // Load only those site to which the index is assigned
        var siteIDs = SearchIndexSiteInfoProvider.GetIndexSiteBindings(ItemID).Column("IndexSiteID").Select(X => X.IndexSiteID.ToString()).ToList();
        if (siteIDs.Count > 0)
        {
            siteWhere = SqlHelper.GetWhereCondition<string>("SiteID", siteIDs, false);

            // Preselect current site if it is assigned to index
            if (!RequestHelper.IsPostBack() && siteIDs.Contains(SiteContext.CurrentSiteID.ToString()))
            {
                selSite.Value = SiteContext.CurrentSiteName;
            }

            selSite.UniSelector.WhereCondition = siteWhere;
            selSite.Reload(false);
        }
        else
        {
            pnlForm.Visible = false;

            ShowError(GetString("srch.index.nositeselected"));
        }

        // If we are editing existing search index
        if (sii != null)
        {
            SearchIndexSettings sis = new SearchIndexSettings();
            sis.LoadData(sii.IndexSettings.GetData());
            SearchIndexSettingsInfo sisi = sis.GetSearchIndexSettingsInfo(ItemGUID);
            if (sisi != null)
            {
                selectForm.Value = ValidationHelper.GetString(sisi.GetValue("FormName"), "");
                txtWhere.TextArea.Text = sisi.WhereCondition;
                selSite.Value = sisi.SiteName;
            }
        }

        // Init controls
        SetControlsStatus(false);
    }