public void ParseXmlToDb(string pathToFile, IList<string> columnOrder)
 {
     var reader = new XmlReader();
     var content = reader.XMLToStringSet(pathToFile, columnOrder);
     var parser = new StringSetToAutoPart();
     parser.InsertDataIntoDB(content,columnOrder);
 }
        public void ParseZipToDB(string inputZip, IList<string> format)
        {
            var reader = new XlsReader();
            var allRows = new List<string>();
            var zipArchiver = new ZipToMultipleXls();
            var allFiles = zipArchiver.GetFiles(inputZip);
            foreach (var file in allFiles)
            {
                allRows.AddRange(reader.ProvideContent(Constants.PathToFiles + "/" + file, "Parts", format));
            }

            var parser = new StringSetToAutoPart();
            parser.InsertDataIntoDB(allRows, format);
        }
Ejemplo n.º 3
0
        public void ParseZipToDB(string inputZip, IList <string> format)
        {
            var reader      = new XlsReader();
            var allRows     = new List <string>();
            var zipArchiver = new ZipToMultipleXls();
            var allFiles    = zipArchiver.GetFiles(inputZip);

            foreach (var file in allFiles)
            {
                allRows.AddRange(reader.ProvideContent(Constants.PathToFiles + "/" + file, "Parts", format));
            }

            var parser = new StringSetToAutoPart();

            parser.InsertDataIntoDB(allRows, format);
        }