yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Quintiq file version 2.0
#parent: splitMain/btnAddKpiValue
Response OnClick () id:Response_splitMain_btnAddKpiValue_OnClick
{
  #keys: '[136398.1.387357216]'
  Body:
  [*
    name  := txtKpiName.Text().TrimBoth();
    value := txtKpiValue.Text().TrimBoth();
    dhSnapshot.Data().Value( relnew, Name := name, Value := StringToReal::UserConverter().Convert( value ) );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
  Precondition:
  [*
    FeedbackObject::AddHard( not isnull( dhSnapshotSet.Data() ), "Please make sure you have a KpiSnapshotSetData dataset selected." );
    FeedbackObject::AddHard( txtKpiName.Text().TrimBoth() <> "", "Please fill in a KPI name." );
    FeedbackObject::AddHard( txtKpiValue.Text().TrimBoth() <> "", "Please fill in a KPI value." );
    FeedbackObject::AddHard( StringToReal::UserConverter().CanConvert( txtKpiValue.Text().TrimBoth() ), "Please fill in a real for the KPI value." );
    return FeedbackObject::IsAllowed();
  *]
}