Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_DialogSelectDemoDataset_OnOK
{
  #keys: '[139394.0.2058325499]'
  Body:
  [*
    // Import demo data                                                                                       
    
    // Prompt confirmation dialog before creating demo data
    msg := Translations::MP_Designer_GetConfirmation_CreateDemoScenarios();
    cond := WebMessageBox::Question( msg, Translations::MP_Designer_YesNo(), 0 ) = 0;
       
    if( cond )
    {       
      democategory := DropDownStringListCategory.Text();
      demoscenario := ifexpr( DropDownStringListScenario.Enabled(), DropDownStringListScenario.Text(),'[All]'); 
      scenario := ScenarioManager.CreateDemoScenariosAndImport( democategory, demoscenario, MPSync, MPDomainHandler, SWF_WorkflowDataset, guard( DataHolderCurrentUser.Data(), '' ) )
      ApplicationMacroPlanner.SelectScenario( scenario );   
    }
    
    this.Close();
  *]
}
