示例#1
0
        private void PopulateControls()
        {
            if (Session != null)
            {
                if (siteSettings != null)
                {
                    DateTime sessionWindowStart = DateTime.UtcNow.AddMinutes(-Session.Timeout);
                    using (IDataReader reader = SiteUser.GetUsersOnlineSince(siteSettings.SiteId, sessionWindowStart))
                    {
                        rptOnlineMembers.DataSource = reader;
                        rptOnlineMembers.DataBind();
                    }

                    if (rptOnlineMembers.Items.Count == 0)
                    {
                        this.Visible = false;
                    }
                }
            }
        }