GetAllJobs() public method

Returns a queryable collection of all Jobs
public GetAllJobs ( ) : IQueryable
return IQueryable
Ejemplo n.º 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();
        }