Exemplo n.º 1
0
 /// <summary>
 /// Sets the view model properties.
 /// </summary>
 /// <param name="viewModel">The view model.</param>
 /// <param name="page">The page.</param>
 /// <param name="totalPages">The total pages.</param>
 protected void SetViewModelProperties(UsersListViewModel viewModel, int page, int?totalPages)
 {
     viewModel.CurrentPage     = page;
     viewModel.TotalPagesCount = totalPages;
     viewModel.ProviderName    = this.ProviderName;
     viewModel.ContentType     = TypeResolutionService.ResolveType(this.ProfileTypeFullName);
     viewModel.CssClass        = this.ListCssClass;
     viewModel.ShowPager       = this.DisplayMode == ListDisplayMode.Paging && totalPages.HasValue && totalPages > 1;
 }
Exemplo n.º 2
0
        /// <inheritDoc/>
        public IEnumerable <CacheDependencyKey> GetKeysOfDependentObjects(UsersListViewModel viewModel)
        {
            var contentResolvedType = this.ContentType;
            var result = new List <CacheDependencyKey>(1);

            result.Add(new CacheDependencyKey {
                Key = contentResolvedType.FullName, Type = contentResolvedType
            });

            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Populates the list ViewModel.
        /// </summary>
        /// <param name="page">The current page.</param>
        /// <param name="viewModel">The view model.</param>
        protected void PopulateListViewModel(int page, UsersListViewModel viewModel)
        {
            int?totalPages = null;

            if (this.SelectionMode == SelectionMode.SelectedItems && this.selectedItemsIds.Count == 0)
            {
                viewModel.Items = Enumerable.Empty <SitefinityProfileItemViewModel>();
            }
            else
            {
                viewModel.Items = this.ApplyListSettings(page, out totalPages);
            }

            this.SetViewModelProperties(viewModel, page, totalPages);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Sets the view model properties.
 /// </summary>
 /// <param name="viewModel">The view model.</param>
 /// <param name="page">The page.</param>
 /// <param name="totalPages">The total pages.</param>
 protected void SetViewModelProperties(UsersListViewModel viewModel, int page, int? totalPages)
 {
     viewModel.CurrentPage = page;
     viewModel.TotalPagesCount = totalPages;
     viewModel.ProviderName = this.ProviderName;
     viewModel.ContentType = TypeResolutionService.ResolveType(this.ProfileTypeFullName);
     viewModel.CssClass = this.ListCssClass;
     viewModel.ShowPager = this.DisplayMode == ListDisplayMode.Paging && totalPages.HasValue && totalPages > 1;
 }
Exemplo n.º 5
0
        /// <summary>
        /// Populates the list ViewModel.
        /// </summary>
        /// <param name="page">The current page.</param>
        /// <param name="viewModel">The view model.</param>
        protected void PopulateListViewModel(int page, UsersListViewModel viewModel)
        {
            int? totalPages = null;
            if (this.SelectionMode == SelectionMode.SelectedItems && this.selectedItemsIds.Count == 0)
            {
                viewModel.Items = Enumerable.Empty<SitefinityProfileItemViewModel>();
            }
            else
            {
                viewModel.Items = this.ApplyListSettings(page, out totalPages);
            }

            this.SetViewModelProperties(viewModel, page, totalPages);
        }
Exemplo n.º 6
0
        /// <inheritDoc/>
        public IEnumerable<CacheDependencyKey> GetKeysOfDependentObjects(UsersListViewModel viewModel)
        {
            var contentResolvedType = this.ContentType;
            var result = new List<CacheDependencyKey>(1);
            result.Add(new CacheDependencyKey { Key = contentResolvedType.FullName, Type = contentResolvedType });

            return result;
        }
 public System.Collections.Generic.IEnumerable<Telerik.Sitefinity.Data.CacheDependencyKey> GetKeysOfDependentObjects(UsersListViewModel viewModel)
 {
     return null;
 }