Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_DialogEditStartOfPlanning_OnOK
{
  #keys: '[139394.0.522280615]'
  Body:
  [*
    // On ok
    if( DateTimeSelectorStartOfPlanning.DateTime() <> MacroPlan.StartOfPlanning() )
    {
      if ( WebMessageBox::Question( Translations::MP_Designer_WarningActualsCleanUp(), 
                                    Translations::MP_Designer_YesNo() ) = 0 )
      {
        btnOk.Enabled( false, Translations::MP_Designer_DialogEditStartOfPlanning_Feedback() ); // Prevent double click
        btnCancel.Enabled( false, Translations::MP_Designer_DialogEditStartOfPlanning_Feedback() ); // Prevent double click
        MacroPlan.UpdateStartOfPlanning( DateTimeSelectorStartOfPlanning.DateTime() );
        LabelAction.Text("Wait");
      }
    }
    else
    {
      Form.Close();  
    }
  *]
}
