陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 );
    }
  *]
}