陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
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
Quintiq file version 2.0
#parent: #root
StaticMethod ValidateInput (
  output String feedback_o,
  output String sanitycheckfeedback_o,
  Operation owner,
  OperationInputGroup operationinputgroup,
  Real quantity
) declarative remote as Boolean
{
  TextBody:
  [*
    // amy Dec-8-2010 (created)
    feedback_o := '';
    sanitycheckfeedback_o := '';
    
    operationname := MacroPlan::GetSubstituteName( owner.Name() );
    
    if( quantity < 0 )
    {
      feedback_o := Translations::MP_OperationInputGroup_ValidateInput_InvalidQuantity( quantity );
      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue();
    }
    
    if( feedback_o <> '' )
    {
      instance := Translations::MP_OperationInputGroup_Instance( guard( operationinputgroup.InputGroupID(), 0 ), operationname );
      feedback_o := SanityCheckMessage::GetFormattedMessage( instance, feedback_o );
    }
    
    return feedback_o = '';
  *]
}