Document Navigator For The Design Index
Previous Section
(Book Administration)
This Section
(Customer Administration)
Next Section
(Transactions)
Previous (Search Customer) View / Update Next (Supervisor Approval)

 


View/Update                                   

 

Inputs (obtained from the Search Customer module)                                   
     
Last Name
A string with a maximum length of 60 characters. This does not need to be unique to each customer (ie. more than one customer can have the same last name).
First Name
A string with a maximum length of 40 characters. This does not need to be unique to each customer (ie. more than one customer can have the same first name).
Phone number
A standard North American phone number. When entering the phone number, if the entry may begin with a '(' and if so has the form '(DDD) DDD-DDDD' where D is a decimal digit in the range of 0-9. If the entry begins with a digit then the accepted form is DDD-DDDD where D is as above. Any other input is invalid and upon leaving the entry will be cleared.
Address
A string with a maximum length of 80 characters. This field represents the name of the street portion of the customers mailing address.
City
A string with a maximum length of 20 characters. This field represents the name of the city portion of the customers mailing address. The acceptable input characters are in the range of A-Z and a-z. This field will be defaulted to the name of the city that the system is installed in.
Province
A string with exactly 2 characters. This field represents the name of the province/state portion of the customers mailing address. The acceptable input characters are in the range of A-Z and a-z. This field will be defaulted to the name of the province/state that the system is installed in.
Country
A string with a maximum of 10 characters. This field represents the name of the country portion of the customers mailing address. The acceptable input characters are in the range of A-Z and a-z. This field will be defaulted to the name of the country that the system is installed in.
Postal Code
A string with a maximum length of 11 characters. If the string begins with a letter then the string must be in the form of LDL DLD, where D is a decimal digit in the range of 0-9 and L is a letter in the english alphabet. If the string begins with a digit then it must be in the form of DDDDDDDDDDD where D is a decimal digit. Any other form the string takes is invalid and the field will be cleared.
Max Books
The maximum number of books the customer can borrow. This field can only be modified by a user with supervisor status. This field will be defaulted to a value determined by the customer.
Max fine
The maximum amount of fines the customer can have. Like the max books, this value can only be modified by a user with supervisor status. This field will be defaulted to a value determined by the customer.
Restricted
Specifies whether or not the customer can borrow. Calculated automatically by the system when the customer's fines exceed the maximum amount allowed. The number of books the customer currently has on loan cannot exceed the maximum number of books allowed. This field will be defaulted to 'No'.
Customer ID Number
A unique integer determined and supplied by the system.
Fines
The customers current fines in dollars and cents. This field will be supplied by the system.
List of Books on Hold and on Loan.

 

Outputs                                   
     Upon acceptance and verification of the customer data the customer will be modified in the database.
     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.
     Recoverable errors (no modifications made) will be dynamically handled by this module through user interaction.

 

Error Conditions                                   
     Syntax errors on inputs to the fields with required formats.
     Input missing from field. (all fields must be complete)
     A change to the default values for Max Books, Max Fines or Restricted with out the valid supervisor password.
     Hardware error is an unrecoverable error that will be processed by the error module.
     Modify requested with no changes made.

 

Description                                   
     The View/Update module will allow the librarian to look at and or modify the customers last name, first name, phone number, address, city, province, postal code, country, max books and max fines. The user will also see all of the books that the selected customer has on loan or on hold and be able to print this along with all of the information about the customer. The user will also be able to permanently remove a customer from the database.
     Buttons present: UPDATE, PRINT, SAVE, REMOVE, QUIT
     
UPDATE
Check to see if any of the fields have been modified. If no fields have been modified display a dialog box with the message: 'Customer Data has not changed'.

Button Present: OK

Close the dialog box and discontinue the update process.

Call the Remove customer process, with the confirmations disabled.

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. Call the Add process from the Add customer module.

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.

PRINT
Send the data 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
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.

REMOVE
Check if the window's list of books on loan has a length greater than zero.

If the customer has books on loan then notify the user with a dialog box with the message: 'Customer has books out on loan. Customer has not been removed.' Press OK and discontinue the remove process.

Close the dialog box and return control to the view/update window. Check if the customer has outstanding fines.

If this is the case, a message box will pop up. Message: "The customer has outstanding fines. Need a supervisor approval. Do you wish to continue?"

Buttons Present: YES, NO

YES
A supervisor approval window pops up (described in 'Supervisor Approval' section). If the approval was ok then the system will close the message box and continue to remove the customer. Otherwise, the system will close the message box and discontinue removing the customer.
NO
Close the message box and discontinue the remove process by returning control to the 'View/Update' window. The system will delete the customer from the database.

If the customer didn't have outstanding fines then a dialogue box will pop up with the message: "Are you sure you want to remove this customer?"

Buttons Present: YES, NO

YES
Remove the dialog box.
Remove the customer from the database, along with any
records of books that were on hold for that customer.
Close the View/Udate window and return to the Search customer window.
NO
Remove the dialog box. Discontinue the remove process and return control to the View/Update window.

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 "View/Update" window and close the "Search" window. Return control to the Main customer menu.

 

Walkthrough                                   
     The user selected a customer from the search customer screen. The librarian then modifies whatever information they choose conforming to the appropriate format for each field. The user clicks on the "Update" button. The customer's information is updated. The librarian then decides (strangely) to delete the customer by clicking on the "Remove" button. The librarian confirms the request by clicking on the "Yes" button. The customer is removed from the database, never to be seen again...

 


Document Navigator For The Design Index
Previous Section
(Book Administration)
This Section
(Customer Administration)
Next Section
(Transactions)
Previous (Search Customer) View / Update Next (Supervisor Approval)

Copyright ©1997 VoidWorks Software Inc.

Send mail to the Group Leader or the Webmaster
Pages created and maintained with Mortar