Ejemplo n.º 1
0
    /// <summary>
    /// Initializes controls on the page.
    /// </summary>
    private void SetupControls()
    {
        if (UserID > 0)
        {
            boardSubscriptions.Visible = true;

            if (MembershipContext.AuthenticatedUser.UserID == UserID)
            {
                boardSubscriptions.ZeroRowsText = GetString("boardsubscripitons.userhasnosubscriptions");
            }
            else
            {
                boardSubscriptions.ZeroRowsText = GetString("boardsubscripitons.NoDataUser");
            }

            // Setup UniGrid control
            boardSubscriptions.IsLiveSite            = IsLiveSite;
            boardSubscriptions.Pager.DefaultPageSize = 10;
            boardSubscriptions.OnAction            += boardSubscriptions_OnAction;
            boardSubscriptions.OnExternalDataBound += boardSubscriptions_OnExternalDataBound;
            boardSubscriptions.OnDataReload        += boardSubscriptions_OnDataReload;
            boardSubscriptions.ShowActionsMenu      = true;

            BoardSubscriptionInfo bsi = new BoardSubscriptionInfo();
            boardSubscriptions.AllColumns = SqlHelper.AddColumns(SqlHelper.JoinColumnList(bsi.ColumnNames), "BoardID, BoardDisplayName, BoardSiteID, NodeAliasPath, DocumentCulture");

            mSiteName = SiteInfoProvider.GetSiteName(SiteID);
        }
        else
        {
            boardSubscriptions.Visible = false;
        }
    }