Quintiq file version 2.0
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[136682.1.1060495901]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  Precondition:
  [*
    sanitycheckfeedback := '';
    unitperiod := guard( DataHolderUnitPeriodTime.Data().Element(0), null( UnitPeriodTime ) );
    return UnitAvailability::ValidateInput( feedback,
                                            sanitycheckfeedback,
                                            guard( unitperiod.Unit(), null( Unit) ),
                                            guard( unitperiod.Start(), DateTime::MinDateTime() ),
                                            DropDownStringListTimeUnit.Text(),
                                            ApplicationMacroPlanner.FormatStringToReal( EditFieldEfficiency.Text() ),
                                            1.0,
                                            DropDownListShiftPattern.Data(),
                                            ApplicationMacroPlanner.FormatStringToReal( EditFieldMinLoadPercentage.Text() ),
                                            ApplicationMacroPlanner.FormatStringToReal( EditFieldMaxLoadPercentage.Text() ),
                                            ApplicationMacroPlanner.FormatStringToNumber( EditFieldNumberOfUnits.Text() ),
                                            guard( DataHolderDialogData.Data().WrappedInstance(), null( UnitAvailability )),
                                            true
                                            );
  *]
  QuillAction
  {
    Body:
    [*
      Form.ApplyChanges();
      Form.OnOK();
      Form.Close();
    *]
  }
}
