Quintiq file version 2.0
#parent: #root
Method EditTransitionType (
  TransitionType_MP transitiontype,
  internal[GUIComponent] parent
) id:Method_DialogCreateEditTransitionType_EditTransitionType
{
  #keys: '[127238.0.515909405]'
  Body:
  [*
    // Edit transition type
    
    data := shadow( transitiontype );
    Dialog.Data( data );
    
    this.UpdateCheckboxState();
    
    result := Dialog.DoModal( parent );
    
    if( result > 0 )
    {
      transitiontype.Update( data.Unit(),
                             data.DefaultMinQuantity(),
                             data.DefaultMaxQuantity(),
                             data.DefaultMinDuration(),
                             data.DefaultMaxDuration(),
                             data.FromCampaignType(),
                             data.ToCampaignType(),
                             RadioButtonGroupQuantityDuration.BoundValue().TrimBoth(),
                             data.HasInputMaxQuantity() and RadioButtonGroupQuantityDuration.BoundValue() = GlobalParameters_MP::GetCampaignTransitionsTypeQuantity(),
                             data.HasInputMaxDuration() and RadioButtonGroupQuantityDuration.BoundValue() = GlobalParameters_MP::GetCampaignTransitionsTypeDuration(),
                             false );
    }
  *]
}
