Rock.Model.ServiceJobService.GetAllJobs C# (CSharp) Method

GetAllJobs() public method

Returns a queryable collection of all Jobs
public GetAllJobs ( ) : IQueryable
return IQueryable
        public IQueryable<ServiceJob> GetAllJobs()
        {
            return Queryable();
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Binds the scheduled jobs.
        /// </summary>
        private void BindGrid()
        {
            var jobService = new ServiceJobService();
            SortProperty sortProperty = gScheduledJobs.SortProperty;

            if ( sortProperty != null )
            {
                gScheduledJobs.DataSource = jobService.GetAllJobs().Sort( sortProperty ).ToList();
            }
            else
            {
                gScheduledJobs.DataSource = jobService.GetAllJobs().OrderByDescending( a => a.LastRunDateTime ).ToList();
            }
            
            gScheduledJobs.DataBind();
        }