Esempio n. 1
0
 public static void ClientImportPostProcess( FileInfo file, int imported, int rejected ) {
   using( DomainContext ctx = new DomainContext() ) {
     Manager mgr = new Manager( ctx );
     ClientFileImportManager clientFileImportManager = new ClientFileImportManager( mgr );
     clientFileImportManager.SaveClientFileImport( file.Name, imported, rejected );
   }
 }
Esempio n. 2
0
 public static IClient GetClientFromImportFile( FileInfo file ) {
   IClient result = null;
   using( DomainContext ctx = new DomainContext() ) {
     Manager mgr = new Manager( ctx );
     ClientFileImportManager clientFileImportManager = new ClientFileImportManager( mgr );
     result = clientFileImportManager.GetClientFromImportFilename( file.Name );
   }
   return result;
 }
Esempio n. 3
0
 public static List<FileInfo> GetClientImportFiles(IClient client) {
   List<FileInfo> result = new List<FileInfo>();
   using( DomainContext ctx = new DomainContext() ) {
     Manager mgr = new Manager( ctx );
     ClientFileImportManager clientFileImportManager = new ClientFileImportManager( mgr );
     var imports = clientFileImportManager.GetClientFileImports( client );
     imports.Select( n => new FileInfo( n.ImportedFilePath ) ).ToList().ForEach( n => {
         result.Add( n );
     } );
   }
   return result;
 }