admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
54
55
Quintiq file version 2.0
#parent: #root
Method ExportEntities (
  Boolean isexportbinary,
  output BinaryValues binaryvalues,
  output Strings brokernames
)
{
  Description: 'Export entities to excel'
  TextBody:
  [*
    // If data are to be exported as binary value
    if( isexportbinary )
    {
      // Export Units as binary data
      progress( 'Exporting units', DateTime::ActualTime() );
      units := this.MP_ExportUnitsBroker().ExecuteToXLS( true );
      this.UpdateExportBinary( units, typeof( MP_ExportUnitsBroker ).ShortName(), binaryvalues, brokernames );
      
      // Export StockingPoints as binary data
      progress( 'Exporting stocking points', DateTime::ActualTime() );
      stockingpoints := this.MP_ExportStockingPointsBroker().ExecuteToXLS( true );
      this.UpdateExportBinary( stockingpoints, typeof( MP_ExportStockingPointsBroker ).ShortName(), binaryvalues, brokernames );
      
      // Export Units as SalesSegments data
      progress( 'Exporting sales segments', DateTime::ActualTime() );
      salessegments:=this.MP_ExportSalesSegmentsBroker().ExecuteToXLS( true );
      this.UpdateExportBinary( salessegments, typeof( MP_ExportSalesSegmentsBroker ).ShortName(), binaryvalues, brokernames );
      
      // Export Groups as binary data
      progress( 'Exporting groups', DateTime::ActualTime() );
      groups := this.MP_ExportGroupsBroker().ExecuteToXLS( true );
      this.UpdateExportBinary(  groups, typeof( MP_ExportGroupsBroker ).ShortName(), binaryvalues, brokernames );
    }
    // If data are not to be exported as binary value
    else
    {
      // Export Units via EDI broker
      progress( 'Exporting units', DateTime::ActualTime() );
      this.MP_ExportUnitsBroker().Execute();
      
      // Export StockingPoints via EDI broker
      progress( 'Exporting stocking points', DateTime::ActualTime() );
      this.MP_ExportStockingPointsBroker().Execute();
      
      // Export SalesSegments via EDI broker
      progress( 'Exporting sales segments', DateTime::ActualTime() );
      this.MP_ExportSalesSegmentsBroker().Execute();
      
      // Export Groups via EDI broker
      progress( 'Exporting groups', DateTime::ActualTime() );
      this.MP_ExportGroupsBroker().Execute();
    }
  *]
}