- Search Customer Window
- The search window is divided into three areas; The top
portion will contain text entry fields for: last name, first
name, phone number, address, city, province, country, postal
code, max fines, max books, customer Id, and circulation status.
Buttons
Present: SEARCH
The middle portion will be where the results of the search
are displayed. This will be in the form of a list with the
following fields present: Last name, first name and any
other fields that were present in the search criteria. It
will only be possible to highlight one entry in the results
list.
Buttons Present: None
The bottom portion will be buttons that will act upon the
selected entry or the entire list from the middle portion.
In addition there will be a space for any messages to the
user to be printed.
Buttons Present: SELECT, PRINT, SAVE, QUIT
- SEARCH
- Upon selection the search customer module will check to see
any fields have been entered.
If no fields have been entered the module will beep once
and display the message : 'Please enter a search criteria
in the fields supplied' and then discontinue the search.
The fields postal code, province, and ID number will be
checked for format errors.
If format errors are found the system will beep and
display the message: `Format error in field XXX' (where
XXX is the name of one or more of postal code, province or
ID number) the search will then be discontinued.
The search module will then formulate a Query based on the
information present and send that query to the database. And
clear the message section of the bottom portion of the
screen.
If the database responds with an unrecoverable error this
module will pass that error to the error handling module
and discontinue the search.
The results of the search will be displayed in the middle
portion of the screen sorted alphabetically by last and
first name.
If the list has a length of 0 then the message : 'No
matching items found please modify search criteria and
reselect search, or select Quit to exit' will be displayed
in message section.
- SELECT (or double click on entry)
- Check the results area to see if an entry has been selected.
If no entry has been selected display the message :
'Please click on an entry from the results list first'.
Select will then discontinue.
Clear the message area.
If the Edit/Update window is currently open refresh it with
the contents of the selected entry along with the results
of a query to get a list of any books the customer has on
loan or hold.
If the Edit/Update window is not currently open call it and
give it the data from the selected entry along with the
results of a query to get a list of any books the
customer has on loan or hold.
- PRINT
- If the length of the list is 0 display the message :
'Nothing to print'. Discontinue the print process.
Send the list to the printer.
If an unrecoverable error (such as read write errors to
the
database) occurs the module will output the error code to
the error handling module and discontinue the process.
- SAVE
- If the length of the list is 0 display the message :
'Nothing
to save'. Discontinue the save process.
Open dialog box with message: 'Enter name of file to save
to.'
Buttons Present: OK, QUIT
- OK
- If the filename is of acceptable format then close the
dialog box and save the file to disk.
If an unrecoverable error (such as read write errors to
the
database) occurs the module will output the error code to
the error handling module and discontinue the process.
- QUIT
- Close the dialog box and discontinue the save process.
- QUIT
- Close the customer search window and return control to the
main customer window.