public void XmlFIleParser_Test() { var xmlFiles = Directory.GetFiles(@"D:\logs\reports"); var filePaser = new SettlementXmlFileParser(); var settlementList = filePaser.ParseXmlFiles(xmlFiles.ToList()); //SettlementDataManager.InsertSettlementReportToDb(settlementList); }
public SettlementReportDto GetSettlementReport(DateTime createdAfter, bool includeAcknowledged) { // create the Amazon report controller and get the file path var filePaths = _reportController.SubmitSettlementReportRequest(createdAfter, includeAcknowledged); if (!filePaths.Any()) { Console.WriteLine("NO settlement report found from Amazon."); return(null); } var settlementData = _fileParser.ParseXmlFiles(filePaths); // then let's delete the files _fileParser.DeleteXmlFiles(filePaths); return(settlementData); }