﻿// ZCSO
// demo transaction of embedded Windows Forms


// delete existing elements (necessary if implemented as parameter transaction)
del (0,0) (20,120)


// initial screen?
if not V[zcso_main_screen=X]
  
  //  title
  Title "Customer Sales Order Dashboard"  
  
  InputField (1,1) "Customer" (1,20) size=10 name="zcso_kunnr_ext" techname="KNA1-KUNNR" -numerical
  
  On "Enter" process="zcso_init_enter.txt"  
  
  Pushbutton (toolbar) "Start" "/0" "F8" process="zcso_init_enter.txt"  

else
 
  
  //  title
  Title "&V[zcso_kunnr_ext]: &V[zcso_name1], &V[zcso_city], &V[zcso_country]"  
  
  // are for VB.NET control
  Control (-1,-1) (50,300) progid="Shell.Explorer"  name="r1" initflag="r1init"   -closeonhide
  
  // embed control
  if V[r1init]
     CallVB charts.zcso.embed "&V[r1]"
  endif
  
  
  Pushbutton (toolbar) "Other customer" process="zcso_main_back.txt"  
  Pushbutton (toolbar) "Display customer data (XD03)" process="zcso_display_customer.txt"  
  
  On "Enter" process="zcso_main_enter.txt"
  On "/3"    process="zcso_main_back.txt"
  
endif
