| Quintiq file version 2.0 | 
| #parent: #root | 
| Method UIShowHideUOMWarning ( | 
|   UnitOfMeasure_MP selectionUOM | 
| ) id:Method_DialogCreateEditProduct_UIShowHideUOMWarning | 
| { | 
|   #keys: '[135040.0.287042047]' | 
|   Body: | 
|   [* | 
|     // Enable & disable UOM warning | 
|     // Show/hide components | 
|     uom := guard( DataHolderDialogData.Data().UnitOfMeasure_MP(), null( UnitOfMeasure_MP ) ); | 
|     isshown := false; | 
|     data := DataHolderDialogData.Data().WrappedInstance(); | 
|      | 
|     //show warning for edit of product, not apply to creation of product | 
|     if( not isnull( uom ) and not isnull( data ) ) | 
|     { | 
|       isshown := uom <> selectionUOM; | 
|     } | 
|      | 
|     ButtonImageUnitOfMeasurementWarning.Visible( isshown ); | 
|      | 
|      | 
|     if( isshown ) | 
|     { | 
|       ButtonImageUnitOfMeasurementWarning.Tooltip(  ApplicationMacroPlanner.FormatLineBreakToHTMLLineBreak( data.GetUpdateUOMWarningMessage() ) ); | 
|     } | 
|   *] | 
| } |