59 lines
1.7 KiB
Plaintext
59 lines
1.7 KiB
Plaintext
# Property of Four Js*
|
|
# (c) Copyright Four Js 1995, 2019. All Rights Reserved.
|
|
# * Trademark of Four Js Development Tools Europe Ltd
|
|
# in the United States and elsewhere
|
|
#
|
|
# Four Js and its suppliers do not warrant or guarantee that these
|
|
# samples are accurate and suitable for your purposes. Their inclusion is
|
|
# purely for information purposes only.
|
|
|
|
IMPORT FGL donations
|
|
DEFINE fname,last VARCHAR(50)
|
|
|
|
DEFINE m_details RECORD
|
|
clubmember INT,
|
|
otherdetail CHAR(50)
|
|
END RECORD
|
|
|
|
MAIN
|
|
OPEN FORM f FROM "Folder"
|
|
OPTIONS INPUT WRAP
|
|
DISPLAY FORM f
|
|
LET fname="Willi"
|
|
CALL donations.fill()
|
|
DIALOG ATTRIBUTES(UNBUFFERED)
|
|
INPUT BY NAME fname,last ATTRIBUTES(WITHOUT DEFAULTS)
|
|
AFTER INPUT
|
|
--some checking if we changed things
|
|
IF FIELD_TOUCHED(fname) OR FIELD_TOUCHED(last) THEN
|
|
DISPLAY "Update customer in the database"
|
|
CALL DIALOG.setFieldTouched("fname",0)
|
|
CALL DIALOG.setFieldTouched("last",0)
|
|
END IF
|
|
END INPUT
|
|
SUBDIALOG donations
|
|
INPUT m_details.* FROM details.*
|
|
AFTER FIELD otherdetail
|
|
--just have a uselesse contraint here to check we come thru
|
|
--in case of leaving the folder
|
|
IF m_details.otherdetail<>'o' THEN
|
|
ERROR "otherdetail must be 'o'"
|
|
NEXT FIELD otherdetail
|
|
END IF
|
|
AFTER INPUT
|
|
--some checking if we changed things
|
|
IF FIELD_TOUCHED(details.*) THEN
|
|
DISPLAY "Update detail in the database"
|
|
CALL DIALOG.setFieldTouched("details.*",0)
|
|
END IF
|
|
END INPUT
|
|
ON ACTION accept
|
|
DISPLAY "accept"
|
|
ACCEPT DIALOG
|
|
ON ACTION cancel
|
|
EXIT DIALOG
|
|
END DIALOG
|
|
END MAIN
|
|
|
|
|