Quintiq file version 2.0
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[412672.0.996751946]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return ddlLine1.Data() <> ddlLine2.Data() and dsEndDate.Date() > dsStartDate.Date();
  *]
  QuillAction
  {
    Body:
    [*
      if( not isnull( DialogData.Data( ))){
        DialogData.Data( ).Update( ddlLine1.Data(),
                                   ddlLine2.Data(),
                                   ddlLine3.Data(),
                                   ddlShiftPattern1.Data(),
                                   ddlShiftPattern2.Data(),
                                   ddlShiftPattern3.Data(),
                                   dsStartDate.Date(),
                                   dsEndDate.Date());
      }else{
        ProductionLineBatchData::Create( MacroPlan,
                                         ddlLine1.Data(),
                                         ddlLine2.Data(),
                                         ddlLine3.Data(),
                                         ddlShiftPattern1.Data(),
                                         ddlShiftPattern2.Data(),
                                         ddlShiftPattern3.Data(),
                                         dsStartDate.Date(),
                                         dsEndDate.Date()); 
      }
      
      // Form.ApplyChanges();
      Form.Close();
    *]
    GroupServerCalls: false
  }
}
