/// <summary>
 /// Populate harvest job information object with meta data by the data reader.
 /// </summary>
 /// <param name="harvestJob">Harvest job.</param>
 /// <param name="dataReader">Database reader.</param>
 public static void LoadHarvestJob(this HarvestJob harvestJob, ArtDatabanken.Database.DataReader dataReader)
 {
     harvestJob.JobStartDate       = dataReader.GetDateTime(HarvestJobTableData.JOBSTARTDATE, DateTime.MinValue);
     harvestJob.HarvestStartDate   = dataReader.GetDateTime(HarvestJobTableData.HARVESTSTARTDATE, DateTime.MinValue);
     harvestJob.HarvestCurrentDate = dataReader.GetDateTime(HarvestJobTableData.HARVESTCURRENTDATE, DateTime.MinValue);
     harvestJob.HarvestEndDate     = dataReader.GetDateTime(HarvestJobTableData.HARVESTENDDATE, DateTime.MinValue);
     harvestJob.JobEndDate         = dataReader.GetDateTime(HarvestJobTableData.JOBENDDATE, DateTime.MinValue);
     harvestJob.JobStatus          = (HarvestStatusEnum)Enum.Parse(typeof(HarvestStatusEnum), dataReader.GetString(HarvestJobTableData.JOBSTATUS), true);
 }
        /// <summary>
        /// Populate harvest job information object with harvest job meta data by the data reader.
        /// </summary>
        /// <param name="harvestJob">Harvest job.</param>
        /// <param name="dataReader">Database reader.</param>
        public static void LoadHarvestJobStatistics(this HarvestJob harvestJob, ArtDatabanken.Database.DataReader dataReader)
        {
            HarvestJobStatistic harvestJobStatistic = new HarvestJobStatistic()
            {
                DataProviderId = dataReader.GetInt32(HarvestJobTableData.DATAPROVIDERID),
                ChangeId       = -1,
                JobStatus      = (HarvestStatusEnum)Enum.Parse(typeof(HarvestStatusEnum), dataReader.GetString(HarvestJobTableData.JOBSTATUS), true),
                HarvestDate    = dataReader.GetDateTime(HarvestJobTableData.HARVESTDATE, DateTime.MinValue)
            };

            harvestJob.Statistics.Add(harvestJobStatistic);
        }