public static SelectStatementBuilder StaticLoadSelectStatementBuilder(string name) { ExportItem exportItem = Data.Get.GetExportItem(name); if (exportItem != null) { return(DeserializeFromXml(exportItem)); } return(null); }
public static IExporter GetExporter(ExportItem exportItem) { switch (exportItem.ExportType) { case "csv": return(new CsvExporter(exportItem)); case "xml": return(new XmlExporter(exportItem)); } return(null); }
public void Save() { ExportItem exportItem = Get.GetExportItem(ExportItemName); if (exportItem == null) { Insert.AddExportItem(ExportItemName, SelectStatementBuilder.SerializeToXml(), ExportItemFtpId, ExportItemRunTime, ExportEnabled, ExportType); } else { Update.UpdateExportItem(this); } }
public static void RunPropertyExportFileNow(string name) { ReportLogger reportLogger = null; try { ExportItem exportItem = Get.GetExportItem(name); reportLogger = new ReportLogger(exportItem.ExportItemName); reportLogger.StartLog("Exporting : " + exportItem.ExportItemName); exportItem.Export(reportLogger); reportLogger.EndLog(exportItem.ExportItemName + " : Exported"); } catch (Exception exception) { if (reportLogger != null) { reportLogger.EndLog(exception); } } }
public CsvDataExporter(ExportItem exportItem) { PropertyExporterLogger = new ReportLogger(exportItem.ExportItemName); if (!CoreDataLib.IsLive()) { ServerPath = @"\\SVRsql4\E$\CoreData\ExportFiles\Test\"; ExportServerTemp = @"E:\CoreData\ExportFiles\Test\Temp\"; TempServerPath = ServerPath + @"Temp\"; } else { ServerPath = "E:\\CoreData\\ExportFiles\\"; ExportServerTemp = @"E:\CoreData\ExportFiles\Temp\"; TempServerPath = ServerPath + @"Temp\"; } ExportItem = exportItem; m_pathAndFileName = TempServerPath + exportItem.ExportItemName + ".csv"; m_selectClause = exportItem.SelectStatementBuilder.SelectStatement(); m_selectStatementBuilder = exportItem.SelectStatementBuilder; }