Пример #1
0
        private void HideUsersOnClick(object sender, EventArgs eventArgs)
        {
            IUserHealth userHealth = Injector.Get <IUserHealth>();

            EnumerateUsers(user =>
            {
                if (user.ContentId != null)
                {
                    var lastLoginData = userHealth.GetLastLoginDetails(user.ContentId);

                    lastLoginData.IgnoredUser = true;

                    userHealth.CreateUpdateLastLoginDetails(lastLoginData);

                    Telligent.Evolution.Extensibility.Caching.Version1.CacheService.Remove(LastLoginDetails.CacheKey(user.ContentId), Telligent.Evolution.Extensibility.Caching.Version1.CacheScope.All);
                }
            });

            //Set up the grid
            SetConfigurationPropertyValue(null);
            _repeater.DataSource = _configurationDataSource;
            _repeater.DataBind();
        }