limj
2023-10-24 93652435728de839582440eefd5122c281181d35
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
Quintiq file version 2.0
#parent: #root
Method ShowWarning (
  UnitOfMeasure_MP newuom
) id:Method_DialogCreateEditPISPSpecification_ShowWarning
{
  #keys: '[136682.1.462060655]'
  Body:
  [*
    isshown := false;
    
    if ( not isnull( DataHolderDialogData.Data().WrappedInstance() ) )
    {
      data := select( DataHolderDialogDatas.Data(), Elements, pisp, pisp.UnitOfMeasure_MP() <> newuom );
      
      isshown := not isnull( data );
      
      if( not isnull( data ) )
      {
        
        //Need to format the text from \n to <BR>
        warning := "<html>" + data.GetUpdateUOMWarningMessage() + "</html>";
        strings := warning.Tokenize( "\n");
      
        ButtonWarning.Tooltip( strings.ToString( "<BR>" ) );
      }
    }
    
    ButtonWarning.Visible( isshown );
  *]
}