Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method SetEntitiesSourceAndPath ( 
 | 
  String source, 
 | 
  Boolean isexcel, 
 | 
  String excelpath 
 | 
) 
 | 
{ 
 | 
  Description: 'Set the import source and/or excel path of IOEntity objects' 
 | 
  TextBody: 
 | 
  [* 
 | 
    //Set the source and path of the Unit broker to the given source and path if the source is not yet 
 | 
    traverse( this.MPSync(), IOUnit, e, 
 | 
              e.DataSource().Length() = 0  
 | 
              or not e.IsSoftDeleted() 
 | 
              ) 
 | 
    { 
 | 
      e.SetDataSource( source, isexcel, excelpath ); 
 | 
    } 
 | 
    //Set the source and path of the stocking point broker to the given source and path if the source is not yet 
 | 
    traverse( this.MPSync(), IOStockingPoint_MP, e, 
 | 
              e.DataSource().Length() = 0  
 | 
              or not e.IsSoftDeleted() 
 | 
              ) 
 | 
    { 
 | 
      e.SetDataSource( source, isexcel, excelpath ); 
 | 
    } 
 | 
    //Set the source and path of the sales segment broker to the given source and path if the source is not yet 
 | 
    traverse( this.MPSync(), IOSalesSegment_MP, e, 
 | 
              e.DataSource().Length() = 0  
 | 
              or not e.IsSoftDeleted() 
 | 
              ) 
 | 
    { 
 | 
      e.SetDataSource( source, isexcel, excelpath ); 
 | 
    } 
 | 
    //Set the source and path of the group broker to the given source and path if the source is not yet 
 | 
    traverse( this.MPSync(), IOGroup, e, 
 | 
              e.DataSource().Length() = 0  
 | 
              or not e.IsSoftDeleted() 
 | 
              ) 
 | 
    { 
 | 
      e.SetDataSource( source, isexcel, excelpath ); 
 | 
    } 
 | 
    //Set the source and path of the sales level broker to the given source and path if the source is not yet 
 | 
    traverse( this.MPSync(), IOSalesLevel_MP, e, 
 | 
              e.DataSource().Length() = 0  
 | 
              or not e.IsSoftDeleted() 
 | 
              ) 
 | 
    { 
 | 
      e.SetDataSource( source, isexcel, excelpath ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |