Quintiq file version 2.0
|
#parent: #root
|
Method ExecuteEntitiesBrokers (
|
Boolean isexcel,
|
BinaryValues binarydatas,
|
Strings brokers
|
)
|
{
|
Description: 'Execute brokers that are associated with objects in Entities ObjectGroup'
|
TextBody:
|
[*
|
if( not isexcel )
|
{
|
this.MPSync().MPSync_ImportEntitiesFromDBBroker().Execute();
|
}
|
else
|
{
|
brokername :="";
|
try
|
{
|
// Groups
|
brokername := typeof( MPSync_ImportGroupsFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportGroupsFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportGroupsFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
|
// Sales segments
|
brokername := typeof( MPSync_ImportSalesSegmentsFromExcelBroker ).Name();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportSalesSegmentsFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportSalesSegmentsFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
|
try
|
{
|
// Stocking points
|
brokername := typeof( MPSync_ImportStockingPointsFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportStockingPointsFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportStockingPointsFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
|
try
|
{
|
// Units
|
brokername := typeof( MPSync_ImportUnitsFromExcelBroker ).ShortName();
|
binaryvalue := this.GetBinaryData( binarydatas, brokers, brokername );
|
this.ValidateBroker( brokername,
|
this.MPSync().MPSync_ImportUnitsFromExcelBroker().Source(),
|
binaryvalue );
|
this.MPSync().MPSync_ImportUnitsFromExcelBroker().ExecuteFromXLS( binaryvalue.AsBinaryData(), true );
|
}
|
onfailure
|
{
|
this.UpdateLastExecutedImportObjectGroupErrorMessage( brokername + ":" + e.GeneralInformation() );
|
}
|
}
|
*]
|
InterfaceProperties { Accessibility: 'Extensible' }
|
}
|