chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Quintiq file version 2.0
#parent: pnlToolbar/btnSynchronize
Response OnClick () id:Response_pnlToolbar_btnSynchronize_OnClick
{
  #keys: '[131094.0.2034175296]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return Form.DatasetsOK();
  *]
  QuillAction
  {
    Body:
    [*
      // Synchronize the imported data to the planning-dataset.
      // Ask if the user want to continue when the are errors.
      continue := true;
      
      if( guard( [Number]lblNrOfErrors.Text(), 0 ) > 0 )
      {
        continue :=  WebMessageBox::Warning( "The imported data contains errors. Only data without errors will be synchronized." +
                                             String::NewLine() + String::NewLine() +
                                             "Do you want to continue?" + String::NewLine(), 
                                             Translations::MessageBox_YesNo(), true ) = 0  // ShowModal
      }
      
      if( continue )
      {
        // Call SynchronizeData in the planning-dataset.
        Form.SynchronizeData();
      }
    *]
    GroupServerCalls: false
  }
}