Add backload for multiple file upload

This commit is contained in:
2016-01-27 11:06:47 -05:00
parent 2c73fb6883
commit 37a7a24436
261 changed files with 28994 additions and 96 deletions
+7 -5
View File
@@ -13,11 +13,13 @@ namespace LeafWeb.Core.Parsers
{
}
public LeafInput Parse()
public LeafInputInfo Parse()
{
// First 10 lines
var leafInput = ParseLeafInput();
leafInput.FileName = CsvFile.Name;
// filename will be stored in LeafInputFile
//leafInput.FileName = CsvFile.Name;
// Next 3 (Header, Units, and Values)
leafInput.Site = ParseLeafInputSite();
@@ -31,7 +33,7 @@ namespace LeafWeb.Core.Parsers
return leafInput;
}
private LeafInput ParseLeafInput()
private LeafInputInfo ParseLeafInput()
{
var items = new List<string>();
for (var i = 0; i < 10; i++)
@@ -44,7 +46,7 @@ namespace LeafWeb.Core.Parsers
throw new ParseException("Could not read first field on line number " + CsvReader.Row);
items.Add(field);
}
return ParsedObjectFactory<LeafInput>.Create(items.ToArray());
return ParsedObjectFactory<LeafInputInfo>.Create(items.ToArray());
}
private LeafInputSite ParseLeafInputSite()
@@ -109,7 +111,7 @@ namespace LeafWeb.Core.Parsers
return ParsedObjectFactory<LeafInputData>.Create(titles, valueArrays.ToArray());
}
public static void ExportCsv(string filename, IEnumerable<LeafInput> leafInputs)
public static void ExportCsv(string filename, IEnumerable<LeafInputInfo> leafInputs)
{
using (var textWriter = new StreamWriter(filename))
{