SquidSoft Inc. - GUIDOs
Detailed Design Document - Personnel


           Table of Contents           

           6 Personnel Interface           

The personnel screen displays information on employee. The following information is displayed in table form of each employee: first name, last name, ID number, security level, position, and store ID. A scroll bar is displayed on the right side if there are more employees than can be seen on the actual screen. Below the table information is a row of buttons to perform certain functions. They are:

ADD
When pressed a blank line will appear in the table above so a new employee can be added. If an error is detected in the input an error message will appear and ask the user to re-enter the information. Then the update button must be pressed to save the new employee information.

DELETE
First the user must highlight one of the employees to delete, by clicking on one of the lines in the table and then press the delete key. A confirmation dialogue box will appear to make sure the selected employee should be deleted.

UPDATE
First the user must select a field to change by clicking on it, which then takes the user to edit mode in that field. After the user is done changing the information the update button is pressed to save the new information. If an error is detected in the input an error message will appear and ask the user to re-enter the information.

FIND
When pressed a dialogue box, containing an ok or cancel button, will appear with fields to enter the employee's name. If the ok button is pressed the employee information will appear in the table. If the cancel button is pressed the dialogue box is removed and no action is performed. If the employee does not exist a message will appear to tell the user that the employee was not found.

SORT BY
When pressed a dialogue box containg the list of all the employee information fields with radio buttons next to each appears. The user then clicks one of the buttons to sort on that field, or the cancel button to do nothing.

PRINT
The Print button will display a common print options box. After choosing the destination for the print job and pressing OK, a print out will be produced in a simple format displaying all the information that is seen in the table.

CHANGE PASSWORD
First an employee must be highlighted by clicking the employee then a dialogue box appears asking the user for the new password. The ok button is pressed to change the password, and if the cancel button is pressed no action is taken and the dialogue box is removed. Only users with a valid security level can access this function.

EXIT
When pressed returns to the Main Menu

If at anytime by pressing one of the buttons is an inapropriate action a beep will sound to indicate to the user that the function selected can not be preformed. For example pressing the delete button before a employee is hightlighted.

           6.1 Personnel Button Selection           

Process Name: Personnel_Button__Selection
Process Number: 6.1
Inputs: employee_id, function_selection, employees.
Outputs: employee_id, employee_listing

Called By: 2
Calls: 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8

Assumptions:

System is using a windows based display. That is the user must be able to click on a button to execute that function and if the button is missed then nothing happens (window error). The user should be able to scroll through the list of personnel using a scroll bar. When the user clicks on a person within the list the employee id is passed to the apporpreate function. So the employee id does not need verification because it can only be selected from the list of employee ids displayed in the window.

Error Conditions:

  1. NONE

Algorithm:

while not at the end of employee file DO
print employee record to screen.
read user function selection
If selection is add then
Add an employee
Else If selection is delete then
Delete an employee
Else If selection is clear password then
Clear the customers password
Else If selection is clear the customer password then
Update the customer information
Else If selection is print then
Print all employees
Else If selection is find then
Find the employee
Else If selection is sort_by then
Sort the employees
End if
End if
End if
End if
End if
End if
End if

           6.2 Add Personnel           

Process Name: Add_Personnel
Process Number: 6.2
Inputs: store_id, employee_id, first_name, last_name, security_level, position, store_ids.
Outputs: employee.

Called By: 6.1
Calls: NONE

Assumptions:

The employee database is big enough to handle many new employees. Pull down choices are used to enter in the security level so no error checking is needed for this.

Error Conditions:

  1. The user inputs a store id that does not exist in the stores database than an error is outputed
  2. The user inputs an employee id that already exists in the employee database than an error is outputed
  3. When the user wishes to add the employee and a field is missing he/she is prompted to enter in all the fields for that employee.

Algorithm:

Get employee information from user
If store id does not exist in employee databaserite then
Print error window "Invalid store_id information!!"
Else If employee_id exists in employee databasethen
Print error window "Employee_id already exists."
Else If all fields existthen
Add employee to database
Else
Print error window "Please enter data in all the fields."
End if
End if
End if

           6.3 Delete Personnel           

Process Name: Delete Personnel
Process Number: 6.3
Inputs: choice.
Outputs: employee_id.

Called By: 6.1
Calls: NONE

Assumptions:

The use of window based displays. That when an employee is deleted it is removed from the database and all connections to that employee are also erased. The user is shure that he/she wants to delete a password.

Error Conditions:

  1. NONE

Algorithm:

Print window "Are you sure you want to delete" employee_id
If answer is delete then
Delete employee from the database
Else cancel
End if

           6.4 Clear Password           

Process Name: Change Password
Process Number: 6.4
Inputs: password, choice.
Outputs: employee_id, employee_id.

Called By: 6.1
Calls: NONE

Assumptions:

The user knows that he/she wants to enter a new password for a given employee.

Error Conditions:

  1. NONE

Algorithm:

Cancel := False
Print window "Enter the new password: " password
read Cancel status
If NOT Cancel then
Print window "Are you sure you want to change the password for" employee_id
If answer is change password then
goto the employee in the database
employee[curr_emp].password := password
Else cancel
End if
End if

           6.5 Update Personnel           

Process Name: Update Personnel
Process Number: 6.5
Inputs: one of store_id, employee_id, first_name, last_name, security_level, position, store_id.
Outputs: new field value of an instance of "employee" and is one of employee_id, store_id, employee_id, first_name, last_name, security_level, position.

Called By: 6.1
Calls: NONE

Assumptions:

NONE

Error Conditions:

  1. store_id does not exist

Algorithm:

Depending on which of the above input fields was selected the following algorithm is executed:

update employee
where employee[employee_id] = employee_id
set employee[field] := input_value
If data store reported success then
display "update completed"
Else display error window with message "unable to update"
End_if

           6.6 Print Personnel           

Process Name: Print Personnel
Process Number: 6.6
Inputs: employees.
Outputs: personnel_report.

Called By: 6.1
Calls: print function

Assumptions:

The current ordering of the employees is the way the user wants the employee report printed.

Error Conditions:

  1. NONE

Algorithm:

Print all the employee records in a report form to the printer. The order will be the same as the current ordering on the screen. To choose a different order see process 6.8 Sort By.

select *
from employee
send employees to print function

           6.7 Find Personnel           

Process Name: Find Personnel
Process Number: 6.7
Inputs: employee_id, last_name, first_name.
Output: employee.

Called By: 6.1
Calls: NONE

Assumptions:

NONE

Error Conditions:

  1. employee does not exist in the data base

Algorithm:

Display Find by window with the folowing blank fields: employee_id, first_name, or last_name

If cancel button selected then
do nothing and return to the personnel screen
end_if
Else if search button selected then
If employee_id is select then
select *
from employee
where employee[employee_id] = employee_id
end_if

If first_name is selected then
select *
from employee
where employee[first_name] = first_name
end_if

If last_name is selected then
select *
from employee
where employee[last_name] = last_name
end_if
end_if

If search unsuccessful then
Print error window "The employee" employee_id "was not found!!"
Else
display requested employee information at the top of the table in the personnel screen
End_if

           6.8 Sort By           

Process Name: Sort By
Process Number: 6.8
Input: employees.
Outputs: sort_choice, employee_listing.

Called By: 6.1
Calls: NONE

Assumptions:

NONE

Error Conditions:

  1. NONE

Algorithm:

Display window "sort by employee id , last name, first name, or security level."
If the sort_choice is employee_id then
List all employee in ascending order by employee_id
Else if choice is last_name then
List all employees in ascending order by last name
Else if choice is first_name then
List all employees in descending order by first name
Else (choice is cancel) do nothing.
End_if
Data Dictionary  
Process Specs  
Testing Plan  

Login  
Main Menu  
Security  
Passwords  
Orders  
Product  
Personnel  
Stores  
Cashier  
Inventory  

Glossary  
Main Page  


About SquidSoft Inc. This site created and maintained
with Mortar