Created
March 2, 2011 14:01
-
-
Save keithbloom/850972 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ImportFiles() | |
{ | |
var query = from f in files | |
where f.Extension.ToLower() == ".zip" | |
select new ImportContext | |
{ | |
ZipFileName = f.FullName, | |
Path = UploadPath | |
}; | |
foreach (var importContext in query) | |
{ | |
extractFromZip.ExtractFiles(importContext); | |
casRecords.Add(importContext); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void Importy() | |
{ | |
foreach (var fileInfo in files) | |
{ | |
if(fileInfo.Extension.ToLower() == ".zip") | |
{ | |
importContexts.Add(new ImportContext | |
{ | |
ZipFileName = fileInfo.FullName, | |
Path = UploadPath | |
}); | |
} | |
} | |
foreach (var importContext in importContexts) | |
{ | |
extractFromZip.ExtractFiles(importContext); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment