Beispiel #1
0
    /// <summary>
    /// Displays specified control.
    /// </summary>
    /// <param name="selectedControl">Control to be displayed</param>
    /// <param name="reload">If True, ReloadData on child control is called</param>
    private void DisplayControl(SelectedControlEnum selectedControl, bool reload)
    {
        // Set correct tab
        SelectedControl = selectedControl;

        // Enable currently selected element
        switch (selectedControl)
        {
        case SelectedControlEnum.Listing:
            if (reload)
            {
                boardSubscriptionList.BoardID = BoardID;
                boardSubscriptionList.ReloadData();
            }

            break;

        case SelectedControlEnum.Edit:
            if (reload)
            {
                boardSubscriptionEdit.GroupID        = GroupID;
                boardSubscriptionEdit.SubscriptionID = SubscriptionID;
                boardSubscriptionEdit.ReloadData();
            }

            break;
        }
    }
    /// <summary>
    /// Displays specified control.
    /// </summary>
    /// <param name="selectedControl">Control to be displayed</param>
    /// <param name="reload">If True, ReloadData on child control is called</param>
    private void DisplayControl(SelectedControlEnum selectedControl, bool reload)
    {
        // First hide and stop all elements
        this.plcList.Visible = false;
        this.boardList.StopProcessing = true;

        this.plcTabs.Visible = true;
        this.plcTabsHeader.Visible = true;

        this.tabEdit.Visible = false;
        this.boardEdit.StopProcessing = true;

        this.tabMessages.Visible = false;
        this.boardMessages.StopProcessing = true;

        this.tabModerators.Visible = false;
        this.boardModerators.StopProcessing = true;

        this.tabSecurity.Visible = false;
        this.boardSecurity.StopProcessing = true;

        this.tabSubscriptions.Visible = false;
        this.boardSubscriptions.StopProcessing = true;

        // Set correct tab
        this.SelectedControl = selectedControl;
        this.pnlContent.CssClass = "TabBody";

        // Enable currently selected element
        switch (selectedControl)
        {
            case SelectedControlEnum.Listing:
                this.pnlContent.CssClass = "";
                this.plcTabs.Visible = false;
                this.plcTabsHeader.Visible = false;
                this.plcList.Visible = true;
                this.boardList.StopProcessing = false;
                if (reload)
                {
                    this.boardList.ReloadData();
                }
                break;

            case SelectedControlEnum.General:
                this.tabEdit.Visible = true;
                this.boardEdit.StopProcessing = false;
                if (reload)
                {
                    this.boardEdit.ReloadData();
                }
                break;

            case SelectedControlEnum.Messages:
                this.tabMessages.Visible = true;
                this.boardMessages.StopProcessing = false;
                if (reload)
                {
                    this.boardMessages.IsLiveSite = this.IsLiveSite;
                    this.boardMessages.BoardID = ValidationHelper.GetInteger(ViewState["BoardID"], 0);
                    this.boardMessages.ReloadData();
                }

                // Breadcrumbs
                if (board == null)
                {
                    board = BoardInfoProvider.GetBoardInfo(this.BoardID);
                    if (board != null)
                    {
                        this.lblEditBack.Text = breadCrumbsSeparator + HTMLHelper.HTMLEncode(board.BoardDisplayName);
                    }
                }

                break;

            case SelectedControlEnum.Moderators:
                this.tabModerators.Visible = true;
                this.boardModerators.StopProcessing = false;
                if (reload)
                {
                    this.boardModerators.ReloadData(true);
                }
                break;

            case SelectedControlEnum.Security:
                this.tabSecurity.Visible = true;
                this.boardSecurity.StopProcessing = false;
                if (reload)
                {
                    this.boardSecurity.ReloadData();
                }
                break;

            case SelectedControlEnum.Subscriptions:
                this.tabSubscriptions.Visible = true;
                this.boardSubscriptions.StopProcessing = false;
                if (reload)
                {
                    this.boardSubscriptions.BoardID = this.BoardID;
                    this.boardSubscriptions.ReloadData();
                }

                break;
        }
    }
Beispiel #3
0
    /// <summary>
    /// Displays specified control.
    /// </summary>
    /// <param name="selectedControl">Control to be displayed</param>
    /// <param name="reload">If True, ReloadData on child control is called</param>
    private void DisplayControl(SelectedControlEnum selectedControl, bool reload)
    {
        // First hide and stop all elements
        plcList.Visible          = false;
        boardList.StopProcessing = true;

        plcTabs.Visible       = true;
        plcTabsHeader.Visible = true;

        tabEdit.Visible          = false;
        boardEdit.StopProcessing = true;

        tabMessages.Visible          = false;
        boardMessages.StopProcessing = true;

        tabModerators.Visible          = false;
        boardModerators.StopProcessing = true;

        tabSecurity.Visible          = false;
        boardSecurity.StopProcessing = true;

        tabSubscriptions.Visible          = false;
        boardSubscriptions.StopProcessing = true;

        // Set correct tab
        SelectedControl     = selectedControl;
        pnlContent.CssClass = "TabBody";

        InitializeBreadcrumbs();

        // Enable currently selected element
        switch (selectedControl)
        {
        case SelectedControlEnum.Listing:
            pnlContent.CssClass      = "";
            plcTabs.Visible          = false;
            plcTabsHeader.Visible    = false;
            plcList.Visible          = true;
            boardList.StopProcessing = false;
            if (reload)
            {
                // Relaod data
                boardList.ReloadData();
            }
            break;

        case SelectedControlEnum.General:
            tabEdit.Visible          = true;
            boardEdit.StopProcessing = false;
            if (reload)
            {
                // Relaod data
                boardEdit.ReloadData();
            }
            break;

        case SelectedControlEnum.Messages:
            tabMessages.Visible          = true;
            boardMessages.StopProcessing = false;
            if (reload)
            {
                boardMessages.IsLiveSite = IsLiveSite;
                boardMessages.BoardID    = BoardID;
                boardMessages.ReloadData();
            }
            break;

        case SelectedControlEnum.Moderators:
            tabModerators.Visible          = true;
            boardModerators.StopProcessing = false;
            if (reload)
            {
                // Reload data
                boardModerators.ReloadData(true);
            }
            break;

        case SelectedControlEnum.Security:
            tabSecurity.Visible          = true;
            boardSecurity.StopProcessing = false;
            if (reload)
            {
                // Reload data
                boardSecurity.ReloadData();
            }
            break;

        case SelectedControlEnum.Subscriptions:
            tabSubscriptions.Visible          = true;
            boardSubscriptions.StopProcessing = false;
            if (reload)
            {
                boardSubscriptions.BoardID = BoardID;
                // Reload data
                boardSubscriptions.ReloadData();
            }

            break;
        }
    }
    /// <summary>
    /// Displays specified control.
    /// </summary>
    /// <param name="selectedControl">Control to be displayed</param>
    /// <param name="reload">If True, ReloadData on child control is called</param>
    private void DisplayControl(SelectedControlEnum selectedControl, bool reload)
    {
        // First hide and stop all elements
        plcList.Visible = false;
        boardList.StopProcessing = true;

        plcTabs.Visible = true;
        plcTabsHeader.Visible = true;

        tabEdit.Visible = false;
        boardEdit.StopProcessing = true;

        tabMessages.Visible = false;
        boardMessages.StopProcessing = true;

        tabModerators.Visible = false;
        boardModerators.StopProcessing = true;

        tabSecurity.Visible = false;
        boardSecurity.StopProcessing = true;

        tabSubscriptions.Visible = false;
        boardSubscriptions.StopProcessing = true;

        // Set correct tab
        SelectedControl = selectedControl;
        pnlContent.CssClass = "TabBody";

        InitializeBreadcrumbs();

        // Enable currently selected element
        switch (selectedControl)
        {
            case SelectedControlEnum.Listing:
                pnlContent.CssClass = "";
                plcTabs.Visible = false;
                plcTabsHeader.Visible = false;
                plcList.Visible = true;
                boardList.StopProcessing = false;
                if (reload)
                {
                    // Relaod data
                    boardList.ReloadData();
                }
                break;

            case SelectedControlEnum.General:
                tabEdit.Visible = true;
                boardEdit.StopProcessing = false;
                if (reload)
                {
                    // Relaod data
                    boardEdit.ReloadData();
                }
                break;

            case SelectedControlEnum.Messages:
                tabMessages.Visible = true;
                boardMessages.StopProcessing = false;
                if (reload)
                {
                    boardMessages.IsLiveSite = IsLiveSite;
                    boardMessages.BoardID = BoardID;
                    boardMessages.ReloadData();
                }
                break;

            case SelectedControlEnum.Moderators:
                tabModerators.Visible = true;
                boardModerators.StopProcessing = false;
                if (reload)
                {
                    // Reload data
                    boardModerators.ReloadData(true);
                }
                break;

            case SelectedControlEnum.Security:
                tabSecurity.Visible = true;
                boardSecurity.StopProcessing = false;
                if (reload)
                {
                    // Reload data
                    boardSecurity.ReloadData();
                }
                break;

            case SelectedControlEnum.Subscriptions:
                tabSubscriptions.Visible = true;
                boardSubscriptions.StopProcessing = false;
                if (reload)
                {
                    boardSubscriptions.BoardID = BoardID;
                    // Reload data
                    boardSubscriptions.ReloadData();
                }

                break;
        }
    }
Beispiel #5
0
    /// <summary>
    /// Displays specified control.
    /// </summary>
    /// <param name="selectedControl">Control to be displayed</param>
    /// <param name="reload">If True, ReloadData on child control is called</param>
    private void DisplayControl(SelectedControlEnum selectedControl, bool reload)
    {
        // Set correct tab
        this.SelectedControl = selectedControl;

        // Enable currently selected element
        switch (selectedControl)
        {
            case SelectedControlEnum.Listing:
                if (reload)
                {
                    this.boardSubscriptionList.BoardID = this.BoardID;
                    this.boardSubscriptionList.ReloadData();
                }

                break;

            case SelectedControlEnum.Edit:
                if (reload)
                {
                    this.boardSubscriptionEdit.GroupID = this.GroupID;
                    this.boardSubscriptionEdit.SubscriptionID = this.SubscriptionID;
                    this.boardSubscriptionEdit.ReloadData();
                }

                break;
        }
    }
Beispiel #6
0
    /// <summary>
    /// Displays specified control.
    /// </summary>
    /// <param name="selectedControl">Control to be displayed</param>
    /// <param name="reload">If True, ReloadData on child control is called</param>
    private void DisplayControl(SelectedControlEnum selectedControl, bool reload)
    {
        // First hide and stop all elements
        this.plcList.Visible          = false;
        this.boardList.StopProcessing = true;

        this.plcTabs.Visible       = true;
        this.plcTabsHeader.Visible = true;

        this.tabEdit.Visible          = false;
        this.boardEdit.StopProcessing = true;

        this.tabMessages.Visible          = false;
        this.boardMessages.StopProcessing = true;

        this.tabModerators.Visible          = false;
        this.boardModerators.StopProcessing = true;

        this.tabSecurity.Visible          = false;
        this.boardSecurity.StopProcessing = true;

        this.tabSubscriptions.Visible          = false;
        this.boardSubscriptions.StopProcessing = true;

        // Set correct tab
        this.SelectedControl     = selectedControl;
        this.pnlContent.CssClass = "TabBody";

        // Enable currently selected element
        switch (selectedControl)
        {
        case SelectedControlEnum.Listing:
            this.pnlContent.CssClass      = "";
            this.plcTabs.Visible          = false;
            this.plcTabsHeader.Visible    = false;
            this.plcList.Visible          = true;
            this.boardList.StopProcessing = false;
            if (reload)
            {
                this.boardList.ReloadData();
            }
            break;

        case SelectedControlEnum.General:
            this.tabEdit.Visible          = true;
            this.boardEdit.StopProcessing = false;
            if (reload)
            {
                this.boardEdit.ReloadData();
            }
            break;

        case SelectedControlEnum.Messages:
            this.tabMessages.Visible          = true;
            this.boardMessages.StopProcessing = false;
            if (reload)
            {
                this.boardMessages.IsLiveSite = this.IsLiveSite;
                this.boardMessages.BoardID    = ValidationHelper.GetInteger(ViewState["BoardID"], 0);
                this.boardMessages.ReloadData();
            }

            // Breadcrumbs
            if (board == null)
            {
                board = BoardInfoProvider.GetBoardInfo(this.BoardID);
                if (board != null)
                {
                    this.lblEditBack.Text = breadCrumbsSeparator + HTMLHelper.HTMLEncode(board.BoardDisplayName);
                }
            }

            break;

        case SelectedControlEnum.Moderators:
            this.tabModerators.Visible          = true;
            this.boardModerators.StopProcessing = false;
            if (reload)
            {
                this.boardModerators.ReloadData(true);
            }
            break;

        case SelectedControlEnum.Security:
            this.tabSecurity.Visible          = true;
            this.boardSecurity.StopProcessing = false;
            if (reload)
            {
                this.boardSecurity.ReloadData();
            }
            break;

        case SelectedControlEnum.Subscriptions:
            this.tabSubscriptions.Visible          = true;
            this.boardSubscriptions.StopProcessing = false;
            if (reload)
            {
                this.boardSubscriptions.BoardID = this.BoardID;
                this.boardSubscriptions.ReloadData();
            }

            break;
        }
    }