| Quintiq file version 2.0 | 
| #parent: Toolbar/btnOk | 
| Response OnClick () id:Response_Toolbar_btnOk_OnClick | 
| { | 
|   #keys: '[123848.0.44590290]' | 
|   Body: | 
|   [* | 
|     // Import demo data                                                                                        | 
|      | 
|     // Prompt confirmation dialog before creating demo data | 
|     msg := Translations::MP_Designer_GetConfirmation_CreateDemoScenarios(); | 
|     cond := MessageBox::Question( this, msg, "&Yes|&No", 0 ) = 0; | 
|         | 
|     if( cond ) | 
|     {        | 
|       democategory := StringSelectionCategory.BoundValue(); | 
|       demoscenario := ifexpr( StringSelectionScenario.Enabled(), StringSelectionScenario.BoundValue(),'[All]');  | 
|       scenario := ScenarioManager.CreateDemoScenariosAndImport( democategory, demoscenario, MPSync, MPDomainHandler, SWF_WorkflowDataset, guard( SWF_DataHolderCurrentUser.Data().Name(), '' ) ) | 
|       ApplicationLibMacroPlanner.SelectScenario( scenario ); | 
|      | 
|     } | 
|      | 
|     Dialog.EndModal(1); | 
|   *] | 
|   DefinitionID: 'Responsedef_GUIButtonBase_OnClick' | 
|   Precondition: | 
|   [* | 
|     return ScenarioNode::CanCreateDemoScenarios( ScenarioManager,  | 
|                                                  StringSelectionCategory.BoundValue(), | 
|                                                  StringSelectionScenario.BoundValue(),  | 
|                                                  feedback ); | 
|   *] | 
| } |