static void CreateAllOutputFiles(ReportLogger reportLogger)
        {
            List <ConfigOPFile> internationalOfferLoaderFiles = new List <ConfigOPFile>();

            reportLogger.StartLog("Load Files to process");
            internationalOfferLoaderFiles = Get.GetInternationalOfferLoaderFiles();
            reportLogger.EndLog("Files Loaded");

            reportLogger.StartLog("Processing International OfferLoader Files");
            try
            {
                foreach (ConfigOPFile configOpFile in internationalOfferLoaderFiles)
                {
                    if (configOpFile.Template.Trim() == "Long")
                    {
                        ProcessLongOutput(configOpFile.FileName, reportLogger);
                    }
                    else if (configOpFile.Template.Trim() == "Detail")
                    {
                        ProcessDetailOutput(configOpFile.FileName, reportLogger);
                    }
                    else if (configOpFile.Template.Trim() == "Short")
                    {
                        ProcessShortOutput(configOpFile.FileName, reportLogger);
                    }
                }
                reportLogger.EndLog("End of International OfferLoader Files");
            }
            catch (Exception e)
            {
                reportLogger.EndLog(e);
            }
        }
        public static void ImportRunFtp()
        {
            ReportLogger importRunFtpLogger = new ReportLogger("ImportRunFtpLogger");

            importRunFtpLogger.StartLog("Start of Run");

            try
            {
                SaveCriteria(importRunFtpLogger);
                UpdateIncludeTable(importRunFtpLogger);
                LoadFlightCostCache(importRunFtpLogger);
                LoadPropertyPriceCache(importRunFtpLogger);
                CreateAllOutputFiles(importRunFtpLogger);
                SendEmails("Dear All, the InternationalOfferLoader has successfully completed an import and load run for");
                importRunFtpLogger.EndLog();
            }
            catch (Exception e)
            {
                importRunFtpLogger.EndLog(e);
            }
        }
        internal static void CheckQueItems()
        {
            List <string> queItems = CoreDataLibrary.Data.Get.GetQueItems();

            Parallel.ForEach(queItems, currentExportItem =>
            {
                ReportLogger reportLogger = new ReportLogger(currentExportItem);
                try
                {
                    ExportItem exportItem = Get.GetExportItem(currentExportItem);
                    reportLogger          = new ReportLogger(exportItem.ExportItemName);
                    reportLogger.StartLog("Exporting : " + exportItem.ExportItemName);
                    exportItem.Export(reportLogger);
                    reportLogger.EndLog(exportItem.ExportItemName + " : Exported");
                }
                catch (Exception e)
                {
                    reportLogger.EndLog(e);
                    Emailer.SendEmail("*****@*****.**", "CoreDataReportService", "MainProcess->Run", e);
                }
            });
        }
        public static void Run()
        {
            if (!CoreDataLib.IsLive())
            {
                List <ExportItem> runList = Get.GetAllRunItems();
                foreach (ExportItem exportItem in runList)
                {
                    ReportLogger reportLogger = new ReportLogger(exportItem.ExportItemName);
                    try
                    {
                        //exportItem.Export(reportLogger);
                        if (exportItem.ExportItemName == "LCH_FullStock_HotelOnly_HC_ENG")
                        {
                            exportItem.Export(reportLogger);
                            //LchFullStockImagesEngTsmExportItem expItem = new LchFullStockImagesEngTsmExportItem(exportItem);
                            //expItem.Export(reportLogger);
                        }
                        //exportItem.Export(reportLogger);
                        //if (exportItem.ExportItemName.Contains("LCH_FullStock_HotelOnly_ENG_100R"))
                        //{
                        //    exportItem.Export(reportLogger);
                        //}
                        reportLogger.EndLog();
                    }
                    catch (Exception e)
                    {
                        reportLogger.EndLog(e);
                    }
                }
                //Parallel.ForEach(runList, currentExportItem =>
                //{
                //    ReportLogger reportLogger = new ReportLogger(currentExportItem.ExportItemName);
                //    try
                //    {
                //        reportLogger.StartLog(currentExportItem.ExportItemName);
                //        currentExportItem.Export(reportLogger);
                //        reportLogger.EndLog();
                //    }
                //    catch (Exception e)
                //    {
                //        reportLogger.EndLog(e);
                //        Emailer.SendEmail("*****@*****.**", "CoreDataReportService", "MainProcess->Run", e);
                //    }
                //});
            }
            else
            {
                List <ExportItem> runList = Get.GetRunItems(DateTime.Now.Hour);

                Parallel.ForEach(runList, currentExportItem =>
                {
                    ReportLogger reportLogger = new ReportLogger(currentExportItem.ExportItemName);
                    try
                    {
                        reportLogger.StartLog(currentExportItem.ExportItemName);
                        currentExportItem.Export(reportLogger);
                        reportLogger.EndLog();
                    }
                    catch (Exception e)
                    {
                        reportLogger.EndLog(e);
                        Emailer.SendEmail("*****@*****.**", "CoreDataReportService", "MainProcess->Run", e);
                    }
                });
            }
        }