public void DoExport(string exportBasePath, string exportMode, string exportType) { ExporterBase exporter = null; switch (exportType) { case "lua": { exporter = new ExporterLua(); } break; case "json": { exporter = new ExporterJson(); } break; } for (var i = 0; i < excelTable.excelSheets.Count; i++) { LogUtils.instance.AddLog("导出页签 : " + excelTable.excelSheets[i].sheetName); exporter.SaveToFile(excelTable.excelSheets[i], exportBasePath + "\\" + excelTable.excelSheets[i].exportPath); } }
private IAccountTransferExporter GetExporter(int?paymentAgencyId, DateTime dueAt, DateTime?dueAt2nd) { ExporterBase exporter = null; var agency = GetSelectedPaymentAgency(paymentAgencyId); if (agency == null) { return(exporter); } var formatId = (AccountTransferFileFormatId)agency.FileFormatId; switch (formatId) { case AccountTransferFileFormatId.ZenginCsv: case AccountTransferFileFormatId.RicohLeaseCollectCsv: case AccountTransferFileFormatId.RisonaNetCsv: exporter = new ZenginCommaExporter(); break; case AccountTransferFileFormatId.ZenginFixed: exporter = new ZenginFixedExporter(); break; case AccountTransferFileFormatId.MizuhoFactorWebFixed: exporter = new MizuhoFactorExporter(); break; case AccountTransferFileFormatId.MitsubishiUfjFactorCsv: exporter = new MUFJFactorExporter(); break; case AccountTransferFileFormatId.SMBCFixed: exporter = new SMBCKoufuriExporter(); break; case AccountTransferFileFormatId.MitsubishiUfjNicosCsv: exporter = new MUFJNicosExporter(); break; case AccountTransferFileFormatId.MizuhoFactorAspCsv: exporter = new MizuhoAspExporter(); break; case AccountTransferFileFormatId.InternetJPBankFixed: exporter = new InternetJPBankExporter { DueAt2nd = dueAt2nd.Value, }; break; } if (exporter == null) { return(null); } exporter.Company = Company; exporter.PaymentAgency = agency; exporter.DueAt = dueAt; exporter.LogError = exception => NLogHandler.WriteErrorLog(exporter, exception, SessionKey); return(exporter); }