hongji.li
2023-11-05 2713c338a98325cad21ebec2085802a5e49a98ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Quintiq file version 2.0
#parent: #root
Method ImportFiles (
  structured[BaseImportObjectGroupInProfile] importobjectgroupinprofile,
  output owning structured[BinaryValue] binaryvalues,
  output structured[String] brokers
) id:Method_DialogUserImportProfile_ImportFiles
{
  #keys: '[132894.0.197614378]'
  Body:
  [*
    // Import files from client side and read into binary
    traverse( importobjectgroupinprofile, Elements, e )
    {
      filenames := e.ImportObjectGroup().GetMPSyncFileNames();
    
      traverse( filenames, Elements, filename )
      {
        filepath := e.BaseImportProfile().ExcelPath() + filename;
    
        if( Application.ClientFileExists( filepath ) )
        {
          bindata := Application.ReadBinaryFile( filepath );
          brokername := Dialog.GetBrokerName( filename );
    
          binaryvalues.Add( bindata.AsBinaryValue() );
    
          if ( brokername.Length() > 0 )
          {
            brokers.Add( brokername );
          }
        }
      }
    }
  *]
}