Beispiel #1
0
        /// <summary>
        /// Binds the Event list grid.
        /// </summary>
        private void BindGrid()
        {
            using (var rockContext = new RockContext())
            {
                var qry = new FollowingEventTypeService(rockContext)
                          .Queryable("EntityType").AsNoTracking()
                          .OrderBy(e => e.Order);

                rGridEvent.DataSource = qry.ToList();
                rGridEvent.DataBind();
            }
        }
Beispiel #2
0
        /// <summary>
        /// Gets the data.
        /// </summary>
        private void GetData()
        {
            if (CurrentPersonId.HasValue)
            {
                _currentSubscriptions = new FollowingEventSubscriptionService(_rockContext)
                                        .Queryable().AsNoTracking()
                                        .Where(s => s.PersonAlias.PersonId == CurrentPersonId)
                                        .Select(s => s.EventTypeId)
                                        .Distinct()
                                        .ToList();
            }

            var qry = new FollowingEventTypeService(_rockContext)
                      .Queryable().AsNoTracking()
                      .Where(e =>
                             e.IsActive &&
                             e.FollowedEntityType != null)
                      .Select(e => e.FollowedEntityType)
                      .OrderBy(e => e.Name)
                      .Distinct();

            rptEntityType.DataSource = qry.ToList();
            rptEntityType.DataBind();
        }
        /// <summary>
        /// Gets the data.
        /// </summary>
        private void GetData()
        {
            if ( CurrentPersonId.HasValue )
            {
                _currentSubscriptions = new FollowingEventSubscriptionService( _rockContext )
                    .Queryable().AsNoTracking()
                    .Where( s => s.PersonAlias.PersonId == CurrentPersonId )
                    .Select( s => s.EventTypeId )
                    .Distinct()
                    .ToList();
            }

            var qry = new FollowingEventTypeService( _rockContext )
                .Queryable().AsNoTracking()
                .Where( e =>
                    e.IsActive &&
                    e.FollowedEntityType != null )
                .Select( e => e.FollowedEntityType )
                .OrderBy( e => e.Name )
                .Distinct();

            rptEntityType.DataSource = qry.ToList();
            rptEntityType.DataBind();
        }
Beispiel #4
0
        /// <summary>
        /// Binds the Event list grid.
        /// </summary>
        private void BindGrid()
        {
            using ( var rockContext = new RockContext() )
            {
                var qry = new FollowingEventTypeService( rockContext )
                    .Queryable( "EntityType" ).AsNoTracking()
                    .OrderBy( e => e.Order );

                rGridEvent.DataSource = qry.ToList();
                rGridEvent.DataBind();
            }
        }