예제 #1
0
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        if (!RequestHelper.IsCallback())
        {
            if (Settings != null)
            {
                if (SelectedNodeValue != DocumentObjectType.DOCUMENT)
                {
                    // Bind grid view
                    gvObjects.Visible    = true;
                    gvObjects.ObjectType = SelectedNodeValue;
                    gvObjects.Settings   = Settings;
                    gvObjects.SiteObject = SiteNode;
                    gvObjects.Bind();

                    gvTasks.Visible    = true;
                    gvTasks.ObjectType = SelectedNodeValue;
                    gvTasks.Settings   = Settings;
                    gvTasks.SiteObject = SiteNode;
                    gvTasks.Bind();
                }
                else
                {
                    gvObjects.Visible = false;
                    gvTasks.Visible   = false;
                }

                // Reload settings control
                if (settingsControl != null)
                {
                    settingsControl.Settings = Settings;
                    settingsControl.ReloadData();
                }
            }

            if (SelectedNodeValue != "")
            {
                if (SelectedNodeValue.StartsWithCSafe("##"))
                {
                    titleElem.TitleText = GetString("ExportTasks." + SelectedNodeValue.Replace(".", "_").Replace("#", "_"));
                }
                else
                {
                    titleElem.TitleText = GetString("ObjectTasks." + SelectedNodeValue.Replace(".", "_").Replace("#", "_"));
                }
                titleElem.TitleImage = GetImageUrl("Objects/" + SelectedNodeValue.Replace(".", "_").Replace("#", "_") + "/object.png");
            }
            else
            {
                titleElem.TitleText = "";
            }

            pnlError.Visible = (lblError.Text != "");

            // Save scrollbar position
            mScrollPosition = ValidationHelper.GetString(Page.Request.Params["hdnexDivScrollBar"], "0");
        }
    }
예제 #2
0
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        if (!RequestHelper.IsCallback())
        {
            if (Settings != null)
            {
                if (SelectedNodeValue != CMS.DocumentEngine.TreeNode.OBJECT_TYPE)
                {
                    DataSet ds = ImportProvider.LoadObjects(Settings, SelectedNodeValue, SiteNode, selectionOnly: true);

                    // Bind grid view
                    gvObjects.Visible    = true;
                    gvObjects.ObjectType = SelectedNodeValue;
                    gvObjects.Settings   = Settings;
                    gvObjects.SiteObject = SiteNode;

                    gvObjects.DataSource = ds;
                    gvObjects.Bind();

                    gvTasks.Visible    = true;
                    gvTasks.ObjectType = SelectedNodeValue;
                    gvTasks.Settings   = Settings;
                    gvTasks.SiteObject = SiteNode;

                    gvTasks.DataSource = ds;
                    gvTasks.Bind();
                }
                else
                {
                    gvObjects.Visible = false;
                    gvTasks.Visible   = false;
                }

                // Reload settings control
                if (settingsControl != null)
                {
                    settingsControl.ReloadData();
                }
            }

            pnlError.Visible = (lblError.Text != "");

            // Save scrollbar position
            mScrollPosition = ValidationHelper.GetString(Page.Request.Params["hdnDivScrollBar"], "0");
        }
    }
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        if (!RequestHelper.IsCallback())
        {
            if (Settings != null)
            {
                if (SelectedNodeValue != CMS.DocumentEngine.TreeNode.OBJECT_TYPE)
                {
                    // Bind grid view
                    gvObjects.Visible    = true;
                    gvObjects.ObjectType = SelectedNodeValue;
                    gvObjects.Settings   = Settings;
                    gvObjects.SiteObject = SiteNode;
                    gvObjects.Bind();

                    gvTasks.Visible    = true;
                    gvTasks.ObjectType = SelectedNodeValue;
                    gvTasks.Settings   = Settings;
                    gvTasks.SiteObject = SiteNode;
                    gvTasks.Bind();
                }
                else
                {
                    gvObjects.Visible = false;
                    gvTasks.Visible   = false;
                }

                // Reload settings control
                if (settingsControl != null)
                {
                    settingsControl.Settings = Settings;
                    settingsControl.ReloadData();
                }
            }

            // Save scrollbar position
            mScrollPosition = ValidationHelper.GetString(Page.Request.Params["hdnexDivScrollBar"], "0");
        }
    }