Quintiq file version 2.0
#parent: #root
Method Edit (
  structured[AccountCost] laneLegCosts,
  FormTransportationCosts formTransportationCosts
) id:Method_DialogCreateEditTransportationCost_Edit
{
  #keys: '[145730.1.959400135]'
  Body:
  [*
    // Set dialog datas
    costs := selectset( laneLegCosts, Elements.astype( LaneLegCost ), e, true );
    owners := selectset(  costs, Elements.LaneLeg, e, true );
    DataHolderDialogDatas.Data( costs.Copy() );
    
    // Set display data
    shadowCost := shadow( costs.First() );
    DataHolderDialogData.Data( &shadowCost );
    
    // Set form data
    DataHolderForm.Data( formTransportationCosts );
    DataHolderFormLaneLeg.Data( &owners );
    
    // Initialize dialog
    this.Initialize();
  *]
}
