예제 #1
0
 /// <summary>
 /// Filters the specified pages.
 /// </summary>
 /// <param name="pages">The pages.</param>
 public void Filter(PageDataCollection pages)
 {
     var output = new PageDataCollection();
     pages.Where(x => !this.notAllowedPageTypes.Any(k => k == x.PageTypeName)).ToList().ForEach(l => output.Add(l));
     pages.Clear();
     output.ToList().ForEach(x => pages.Add(x));
 }
예제 #2
0
        private List <PageData> Sort(IEnumerable <PageData> pages, FilterSortOrder sortOrder)
        {
            var asCollection = new PageDataCollection(pages);
            var sortFilter   = new FilterSort(sortOrder);

            sortFilter.Sort(asCollection);
            return(asCollection.ToList());
        }
예제 #3
0
        protected void SearchEvents()
        {
            var allEvents = ParticipantProviderManager.Provider.GetEventPages();

            var upcomingEvents = (from PageData p in allEvents orderby((EventPageBase)p).EventDetails.EventStart where ((EventPageBase)p).EventDetails.EventStart >= FromDateTime && ((EventPageBase)p).EventDetails.EventEnd <= ToDateTime select p);

            var upcomingEventPages = new PageDataCollection(upcomingEvents);

            new EPiServer.Filters.FilterAccess(EPiServer.Security.AccessLevel.Publish).Filter(upcomingEventPages);

            (AttendParticipantList as ParticipantList).SetEventPageBaseList(upcomingEventPages.ToList <PageData>());
        }
예제 #4
0
        protected void SearchEvents()
        {
            var allEvents = ParticipantProviderManager.Provider.GetEventPages();

            var upcomingEvents = (from PageData p in allEvents orderby ((EventPageBase)p).EventDetails.EventStart where ((EventPageBase)p).EventDetails.EventStart >= FromDateTime && ((EventPageBase)p).EventDetails.EventEnd <= ToDateTime select p);

            var upcomingEventPages = new PageDataCollection(upcomingEvents);
            new EPiServer.Filters.FilterAccess(EPiServer.Security.AccessLevel.Publish).Filter(upcomingEventPages);

            (AttendParticipantList as ParticipantList).SetEventPageBaseList(upcomingEventPages.ToList<PageData>());

        }