In this exercise we combine exercises Interface…
and Database for membership card, which were created earlier.
Phase 1: Basic functionality
- Which means, that when user push the ‘Save’-button
on the form, program calls method saveMember() in class Member. After this
method getMember() is called to get memberid.
- When button ‘Cancel’ is pushed, method getMember()
is called directly, if state of program was UPDATE. If state was INSERT,
all fields on the form are cleared.
- Similarly, when button ‘REMOVE’ is pushed, method
removeMember() is called.
Phase 2: Lookups
- Furthermore, when leaving fields TYPE and POSITION,
values of these fields are checked by using checkLogin() of classes
MemberType and Position (and NOTES fields are filled). Fields TYPEID and
POSITIONID needs own parameters (for returning values to method ‘Save’).
- Similarly, when lookup buttons for fields Type and
Position, method getAll() for classes MemberType and Position are called
for showing possible options for these fields.