Quintiq file version 2.0
#parent: Panel351/btn_Add_Order_FOF449
Response OnClick (
  H_Forecast selection
) id:Response_Panel351_btn_Add_Order_FOF449_OnClick_880
{
  #keys: '[414724.0.141244111]'
  CanBindMultiple: false
  DefinitionID => /Panel351/Responsedef_Panel351_btn_Add_Order_FOF449_OnClick
  QuillAction
  {
    Body:
    [*
      if( not isnull( selection))
      {
        SelectItem :=  select( MacroPlan,H_MessagePassing,Obj,Obj.FKey()="FrmOrderForecast" and Obj.ItemKey()="ListSelect");
        if( isnull( SelectItem))
        {
           MacroPlan.H_MessagePassing(relnew,FKey :="FrmOrderForecast",ItemKey := "ListSelect",
                                       Value := selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName(),
                                       ValueJsonString := JSON::Object().Add( "SKU",selection.SKU())
                                                                         .Add( "Util",selection.Util())
                                                                         .Add( "CustomCode",selection.CustomCode())
                                                                         .Add( "CustomName",selection.CustomName()).Build().AsString());
        }
        else
        {
          SelectItem.Value(selection.SKU()+";"+selection.Util()+";"+selection.CustomCode()+";"+selection.CustomName());
          SelectItem.ValueJsonString(JSON::Object().Add( "SKU",selection.SKU())
                                   .Add( "Util",selection.Util())
                                   .Add( "CustomCode",selection.CustomCode())
                                   .Add( "CustomName",selection.CustomName()).Build().AsString());
        }
        Application.OpenForm( "FrmAuthorizeAndCountersign_Order","modal");  
      }
      else
      {
        WebMessageBox::Information( "请选择一项预测后再点击按钮！");  
      }
    *]
    GroupServerCalls: false
  }
}
