Académique Documents
Professionnel Documents
Culture Documents
Payment System
Jacob Coy
Contents:
1: Analysis
5
1.1 Introduction: 5
1.2 Investigation: 5
Calculating Overtime: 6
2: Design 11
Table: Staff 13
Table: Weeks 14
2.3.1 Forms: 15
2.3.2 Reports: 24
2
Jacob Coy
Testing 30
Systems Maintenance 67
4.1.2 Tables: 67
4.2 Forms: 70
4.3 Reports 74
5. User Manual: 76
6. Appraisal 77
Login Form: 80
Springboard Form: 81
3
Jacob Coy
4
Jacob Coy
1: Analysis
1.1 Introduction:
Boots is an international company selling and providing pharmaceutical products either to be
sold or used in prescriptions, whilst also selling healthcare and beauty products. I currently
work as a prescription dispenser for Boots store 1019 in Romsey. Contacts within the
business are varied with team managers for various stores and head office in nottingham. I
was initially approached by my store manager to develop a new system of monitoring
members of staff’s working hours.
1.2 Investigation:
Through the use of an interview with my store manager I will ascertain what the current
system is capable of doing as well as what the new system is needed to perform.
Listed below are the things that i will need to find out about the current system.....
5
Jacob Coy
Calculating Overtime:
overtime is calculated through looking at the timesheets for the letters OT as discussed
earlier, overtime payment is general time and a half depending on the member of staffs job
role and also how many hours they work normally. This is then added onto the existing pay
packet shown as extra duties on their payslip.
6
Jacob Coy
7
Jacob Coy
Time Sheet for that day stored Time Sheet For The Day
away Created
payment is given
8
Jacob Coy
9
Jacob Coy
• A startup home screen with a clear function of allowing the user to navigate to the different
functions of the application simply.
• A form containing all the necessary elements to modify and add members of staff and their
details simply and efficiently
• Form to edit an individuals week and the hours they have worked using numbers instead of
using 15 minute blocks
• The ability to create reports for a particular member of staff cross referenced by the year
month week and day
10
Jacob Coy
2: Design
11
Jacob Coy
12
Jacob Coy
My database will consist of 2 entity’s that share a relationship with Staff ID. Using only two
entities will keep my database small and easy to manage as I will fill these out with many
attributes.
Table: Staff
Field Name Type Size (bytes) Format Validation
Name Text 50
Address Text 50
13
Jacob Coy
Table: Weeks
Field Name Type Size (bytes) Format Validation
14
Jacob Coy
2.3.1 Forms:
The main purpose of this form is as a springboard to navigate to other forms that perform
actions that are required by Boots. Designing a form as shown below means that I am able to
keep the user interface clean and allow for a simple and unified approach to the application.
15
Jacob Coy
This sketch here depicts what the initial springboard form will look like. As seen in the image it
is a very simple form consisting of 4 buttons and 1 placed image with a simple background
image. By not allowing the form to be maximized or enlarged I am keeping the form fixed to
the size that is required in order to keep the application using a small amount of screen real
estate and I believe that this is integral to keeping the application simple and useable by any
member of staff no matter how much IT experience or training they have.
Code Used:
Because it is a springboard form it needs very little code, with all code referring to the
opening of all other forms in the application itself
“ formstaff.show”
Timesheet Creation Button:
“ formtimesheet.show”
Staff’s Week Button:
“ formweek.show”
Reports Button:
“ formreport.show”
16
Jacob Coy
This form is simple in construction although its main purpose is to create a new record in the
database table for Weeks. The code in the background will create a record in Weeks table for
every single member of staff in the database so if there are 17 members of staff contained in
the Staff table then 17 records would be created for the year 2009 week 1 for example.
Using a simple method of combo box’s to select the values required to be used in the
database means that the form itself is kept to a minimal size and is kept simple with most of
the work being performed by the application itself.
17
Jacob Coy
On Form Load:
Create Button:
After button_click
Create new rows in database table weeks for each member of staff
contained in database table staff
Row.staff ID = staff id pulled from table staff
Row.weeknumber = week number taken from combo box week
Row.year = year taken from combo box year
Row.Monday = default value of 0
Row.Monday start = timeofday from computer
Row.Monday finish = time of day from computer
Row.Tuesday = default value of 0
Row.Tuesday start = time of day from computer
Row.Tuesday finish = time of day from computer
Row.Wednesday = default value of 0
Row.Wednesday start = time of day from computer
Row.Wednesday finish = time of day from computer
Row.Thursday = default value of 0
Row.Thursday start = time of day from computer
Row.Thursday finish = time of day from computer
Row.Friday = default value of 0
Row.Friday start = time of day from computer
Row.Friday finish = time of day from computer
Row.Saturday = default value of 0
Row.Saturday start = time of day from computer
Row.Saturday finish = time of day from computer
Row.Sunday = default value of 0
Row.Sunday start = time of day from computer
Row.Sunday finish = time of day from computer
Row.standard payment = default value of 0
Row.overtime payment = default value of 0
18
Jacob Coy
When the create button is clicked it runs through all of the code above adding values to the
rows it creates in the database table weeks for each member of staff automatically pulling the
Staff ID from the Staff table and then transferring that into the row Staff ID.
This is probably my most complicated and time consuming form to create. The form’s main
purpose is to view a member of staffs week determined by the week and year chosen. This
data is then shown in the text boxes on the form and you are able to edit the data and then
save the data back into the database overwriting previous data for a member of staff.
Combo boxes to
control what data is shown
19
Jacob Coy
On Form Load:
The code on the loading of the form is used to work out what values are required to be
contained in combo box “cmbyear” it does this by reading the current date from the
computers internal clock then taking 3 years off it and adding 7 years giving the values ahead
of the date and the values behind the current date so you can go back in time to view weeks
as well as creating weeks ahead of the current date so that you can book in staffs weeks
ahead.
Generate Button:
20
Jacob Coy
Exit sub
End Try
Found = false
For I = 0 to form1.bootsdbdataset1.weeks.count is - 1
If staff id and weeknumber and the year is all filled then
Found = true
Txtmonday.text shows data from bootsdbdataset1.weeks Monday
Txtmondaystart.text shows data from bootsdbdataset1.weeks
Monday_start
Txtmondayfinish.text shows data from bootsdbdataset1.weeks
monday_finish
Txttuesday.text shows data from bootsdbdataset1.weeks
Tuesday
Txttuesdaystart.text shows data from bootsdbdataset1.weeks
Tuesday_start
Txttuesdayfinish.text shows data from bootsdbdataset1.weeks
Tuesday_finish
Txtwednesday.text shows data from bootsdbdataset1.weeks
Wednesday
Txtwednesdaystart.text shows data from
bootsdbdataset1.weeks Wednesday_start
Txtwednesdayfinish.text shows data from
bootsdbdataset1.weeks wednesday_finish
Txtthursday.text shows data from bootsdbdataset1.weeks
Thursday
Txtthursdaystart.text shows data from bootsdbdataset1.weeks
thursday_start
Txtthursdayfinish.text shows data from
bootsdbdataset1.weeks thursday_finish
Txtfriday.text shows data from bootsdbdataset1.weeks Friday
Txtfridaystart.text shows data from bootsdbdataset1.weeks
friday_start
Txtfridayfinish.text shows data from bootsdbdataset1.weeks
friday_finish
Txtsaturday.text shows data from bootsdbdataset1.weeks
Saturday
Txtsaturdaystart.text shows data from bootsdbdataset1.weeks
saturday_start
Txtsaturdayfinish.text shows data from
bootsdbdataset1.weeks saturday_finish
21
Jacob Coy
22
Jacob Coy
23
Jacob Coy
2.3.2 Reports:
24
Jacob Coy
The report runs through a query and the selection material of the query is shown below.
25
Jacob Coy
This report is available to the user as a paper based back up of data for each member of
staff. This printed report can be kept for up to a year and as such they needs to be a paper
based copy in a member of staffs file. Simply showing all of the data collected about that
member of staff for an individual week. This is a benefit to the end user/s because it means
that if they need to have a printed copy of a week they do not have to sift through the
member of staffs folder as previously they can just select the year week and member of staff
and have the data generated for them with minimal effort.
Springboard
26
Jacob Coy
The major thing that is required of the application is that it is able to achieve all of its purposes
without crashing which would decrease productivity and mainly its actual usefulness in the
store. In order to test this I will be running through every form in the application and testing
every button and element of each form making sure no problems arise that would cause a
form to crash. Any problems that do arise in regards to data entry I shall be dealing with
these using data validation, as this means that the program does not crash and will aid the
end user in solving the problem and continuing with the program without having to reload it.
After testing that all of the forms work as they are expected to and that validation is effective
in solving problems and helpful to the user I will be checking that all the important functions of
the application regarding maths and data is working properly. This will mean performing
manual calculations and comparing these to that of data shown by the application itself, as
well as making sure that data entered into the application through forms is displaying
correctly in the database itself. This is important as if any of this data is wrong it could cause
payments to staff to be incorrect and staff may be overpaid or underpaid this would not only
lose money for boots but could also be stressful to staff involved. I shall be testing the
following data entry and output functions of the program....
• Creating a timesheet
27
Jacob Coy
28
Jacob Coy
Shown above is the design for the password form. As discussed earlier it is a simple form
with few elements, running simply using a few if statements and validation rules the end user
just has to enter the correct password and hit “Login To The System”. The text box used to
enter the password is formatted with an input mask showing the password as a series of
asterix’s e.g. Passwordtest would be ************ .
By adding in validation to the form so that if the password is entered incorrectly 5 times the
entire program closes (after a msgbox appears) means that the program has a more secure
nature.
29
Jacob Coy
3. Testing
Table: Staff:
The Staff table holds data about each member of staff that works for the store. By defining
Staff ID as the Primary Key it stops data duplication from happening as easily also giving
each individual member of staff added to the database a unique identifier. This data is
generally only known to 3 people. 1) the member of staff. 2) the store manager. and 3) The
staff manager. Although only the store manager and staff manager will have access to this
data though the password form.
30
Jacob Coy
Table Weeks:
This is my second and final table. The Weeks table contains all the data associated with an
individual week in a year by each member of staff in the database. These tables are not
created in the database itself but are created by the application on a specially designed form.
Primary keys in this table are Week Number, Year and Staff ID. Using a combination of the 3
means that I will struggle to create a week for a specific year and member of staff more than
once, which if I did would falsify the data contained within this table.
31
Jacob Coy
4 M a i n Check that the button Add and edit staff form page #40
Springboard opens the correct form should open and not
Form (add and a n d f a d e s o u t t h e let you select from the
edit staff springboard form not springboard form.
button) letting you go back to it
till closing the form
open.
32
Jacob Coy
No Area Tested Test Data Description Purpose Expected Outcome Output Reference
8 Add and Edit Staff ID1 Check that staff ID one Data for staff member page #43
Staff form shows data and it is “betty” should show
correct with data shown and be the same as in
in the database table for the database.
staff.
9 Add And Edit N e w S t a f f Test to check if new Once the + button has page #44
Staff Form Button. Name staff can be added to been clicked a new
= “ j o h n ” the database. Data s t a f f I D w i l l b e
a d d r e s s = fields filled out and then generated and then
“johns house” hit save. data will need to be
phone = filled in. After which
“02380457845 hitting save should
” weekdays £ = save all this data into
“1.50” Sunday the database and be
£ = “3.00” avaliable in the
overtime £ = program.
“7.00” Monday
= “1” Tuesday
= “2”
Wednesday =
“3” Thursday =
“4” Friday = “5”
Saturday = “6”
Sunday = “7”
Then click save
button
10 Add And Edit Test to see if staff can Once John has been page #45
Staff Form be deleted from the found by clicking the
database successfully. arrows on the top right
of the control bar
clicking the X in the
bar should delete John
from the database and
the program.
33
Jacob Coy
No Area Tested Test Data Description Purpose Expected Outcome Output Reference
11 Create a New Year = 2007 Test to see if a new After clicking create page #47
T i m e s h e e t week number t i m e s h e e t c a n b e the timesheet should
Form = 50 created successfully. b e c re a t e d i n t h e
database and you can
then edit this
timesheet in the
editweeks form
12 Create a New Test to check that the Current year with 3 page #48
Timesheet dates in Year are correct years behind and 4
F o r m ( Ye a r with the algorithm and ahead and 52 weeks
Combobox t h a t t h e r e a r e t h e to choose from in the
correct amount of week weeks combobox.
Week Number
numbers.
Combobox)
13 Create a New Y e a r Test to make sure I Typing anything into page #49
T i m e s h e e t Combobox “a” cannot enter data into the combobox should
Form the comboboxes with e i t h e r s e l e c t t h e
Week Number
the use of a keyboard closest number value if
Combobox
that would contradict numbers are entered
“54”
with the data available or nothing if text is
to choose from. entered.
14 Create a New Y e a r Making sure that both Message box should page #49
T i m e s h e e t Combobox = comboboxes have data appear for either one
Form “” i n s i d e t h e m b e f o re telling the user that
creating a n e w they cannot create a
Week Number
timesheet. timesheet until they
Combobox “1”
have chosen data from
& both comboboxes.
Y e a r
combobox =
“2009”
Week number
combobox “”
34
Jacob Coy
No Area Tested Test Data Description Purpose Expected Outcome Output Reference
16 Edit Weeks Test to make sure that All names from staff page #52
Form (name all of the staff in the database are shown in
combobox, database are shown in the drop down menu
year the combobox for name as well as the correct
combobox. as well as the years years and 52 weeks in
Week number being correct (3 behind, a year.
combobox_ 4 ahead of the current
year) and 52 weeks in
weeks combobox
17 Edit Weeks Year = “2006” Making sure that you Message box should page #53
Form cannot edit a timesheet appear to instructing
Week number
that does not exist in the t h e u s e r t h a t t h e
= “50”
database. criteria they have
chosen from does not
exist in the database
yet.
19 Edit Weeks Checking that clicking Once data is saved it page #55
Form (save t h e s a v e c h a n g e s should be updated
changes button saves the data and be identical in the
button) edited in the form back database
to the database.
35
Jacob Coy
No Area Tested Test Data Description Purpose Expected Outcome Output Reference
21 Edit Weeks M e m b e r o f Test to make sure that Message box should page #59
Form staff = “betty” the application checks appear informing the
year = “2009” that you have entered user that they have not
week number something in all the text entered data for all text
= “1” Monday b o x e s o n t h e f o r m boxes on the form.
= “” Monday before allowing you to
start = “00:00” s a v e b a c k t o t h e
Monday finish database.
= “00:00”
Tuesday = “2”
Tuesday Start
= “10:00”
Tuesday finish
= “12:00”
Wednesday =
“1” Wednesday
start = “12:00”
Wednesday
finish = “13:00”
Thursday = “3”
Thursday start
= “12:00”
Thursday finish
= “15:00”
Friday = “1”
Friday start =
“14:00” Friday
finish = “15:00”
Saturday = “”
Saturday start
= “00:00”
Saturday finish
= “00:00”
Sunday = “0”
Sunday start =
“0:00” Sunday
finish = “00:00”
s t a n d a r d
payment =
“5.00” overtime
payment =
“7.50”
36
Jacob Coy
No Area Tested Test Data Description Purpose Expected Outcome Output Reference
24 Generate Individual year Testing to see if the Message box appears page #61
reports form Wages: Name application will let you telling the user that
= “betty”, Year g e n e r a t e a r e p o r t they have no selected
= “” without first picking all data required for a
the information required report from the drop
per report down menus.
25 Generate Staff Weekly Testing to see if the Report should print page #61
reports form Hours: Name = information displayed on w i t h a l l c o r r e c t
“betty”, year = the report is correct to information displayed
“2009”, week the data in the table
number = “2” weeks contained in the
database
27 Generate Individual Week Testing to see if the Report should print page #62
reports form Wages: Name information displayed on w i t h a l l c o r r e c t
= “Mark”, Year the report is correct to information displayed
= 2009 the data in the table
weeks contained in the
database
37
Jacob Coy
Test 1 requires me to type the correct password for the application, this is passwordtest. In
the screenshots below it is displayed as “************” because it uses an input mask. Once
the password is typed in I clicked “login into the system!”
After clicking the login button you are taken to the main springboard form meaning that the
password was correct and the login screen works when a correct password is entered as
shown below.
38
Jacob Coy
Test 2:
For test 2 I have to do the opposite of test 1 and type in an incorrect password in this
example I will be using the word “suck” once typed into the password text box it is shown as
“****”
39
Jacob Coy
After clicking the login button you are greeted with a message box that tells you what you
have done wrong, and gives you the option to type the password again by clearing the text
box once you have clicked ok.
40
Jacob Coy
Test 3:
By repeating the proccess of typing in “suck” 5 times I am trying to see if the program will
close itself after 5 failed attempts typing in suck as shown above again I am greeted with 5
message box’s saying “sorry that was an incorrect password” before the message box
below. Once I had clicked ok the program closed.
Test 4:
Opening the different functional forms from the main springboard form is a vital role of the
program and as such testing that each form opens when the button is clicked is an important
test as you would not be able to use the program without them. Clicking the “Add And Edit
41
Jacob Coy
Staff” button produces the following effect. This shows that the form I want opens
Test 5:
Repeated steps as above for “Create A New Timesheet” produces. Proving form opens when
button is clicked
42
Jacob Coy
Test 6:
Repeated Steps as of test 4 for “View A Member Of Staff’s Week” produces. Proving form
opens when button is clicked
43
Jacob Coy
Test 7:
Repeated Steps as of test 4 for “Generate Report On A Member Of Staff” produces. Proving
form opens when button is clicked
44
Jacob Coy
Test 8:
Test 8 requires me to load the Add and Edit Staff form and find Staff ID 1. This is Betty, the
test is to see if the data being displayed on the application is the same as in the staff table of
the database to check this I will open the database and take a screenshot of the staff table
where betty is. Putting this data alongside the applications will show whether it is identical.
Data is displaying properly in the application with exactly the same data as the database.
45
Jacob Coy
Test 9:
Test 9 is about making sure that I can add staff to the database into the staff table. To do so I
clicked the + icon and added the data as shown in the test table, then hit save. To check that
it has saved into the database I have opened it and taken screenshots from the staff table
where john lies.
46
Jacob Coy
All the data is exactly the same in the database as was entered in the application.
Test 10:
For test 10 I need to navigate to staff member John and delete him, using the control panel at
the top of the form I can navigate to john and simply just hit the X to delete him. By checking
whether he has been deleted from the database will proove that this test is a success.
47
Jacob Coy
This is showing how John doesn’t exist in the database anymore after deletion using the form
above.
48
Jacob Coy
Test 11:
Starting on a new form test 11 involves the creation of a new timesheet with the values 2007
for the year and week number 50. The screenshot below shows the selection of these from
the drop down menu’s then by clicking create it will create a timesheet for each member of
staff for that year this can be proven by going into the database.
49
Jacob Coy
Test 12:
Test 12 is to check that the algorithm I created to create a preset amount of years to choose
from in drop down menu’s works. This is important as I have used them in every form and
need to make sure that the algorithm works and so that data is valid and useful.
Dim i As Integer
year = DateAndTime.Year(DateValue)
year = year - 3
cmbyear.Items.Add(i) ”
50
Jacob Coy
Part 2 of the test is to make sure that all 52 weeks show in the combo box as anymore than
52 or any less and members of staff may get confused.
Test 13:
Test 13 is to make sure I cannot enter text into a numerical field and so that I cannot type in
manually a week number that does not exist. I did this by opening the create timesheets form
and immediately trying to type 54 into week number, doing so produces..
As it is coded trying to type 54 will produce 5 and 40 in the week number combo box this is
because it is instructed to go to the closest value to what was entered by the keyboard by
the items entered into the combobox’s properties. In terms of year it is physically impossible
to type an “A” as you have to enter a number by typing it in similar to that of weeknumber or
by selecting it from the drop down menu.
51
Jacob Coy
Test 14:
Test 14 involves making sure that you cannot proceed to create a timesheet without
supplying both a year and a week number as this would crash the application. In order to test
this I have selected to enter just a week number of 1 and then click create. This produces.
52
Jacob Coy
As you can see you are not able to continue with creating a timesheet until you add a week
number or a year.
53
Jacob Coy
Test 15:
Test 15 involves making sure it is not possible to produce a timesheet in the database that
already exists as this could a) wipe data already existing under that date. And b) could muck
up payments with staff. Choosing a week and year that I knew were already existing in the
database I clicked create and the results are shown below...
Test 16:
Test 16 is to make sure that comboboxes for the names of the inmates in the prison were
correct. Testing this out on the editweeks form I found that the inmates names and years
were correct in the drop down boxes.
54
Jacob Coy
Test 17:
In order to not corrupt the data in the database I need to make sure that it isnt not possible to
open a timesheet and save the data for a year and week that doesn’t have a timesheet
associated with it yet. When I choose Betty and 2006 as the year with week number set as
50 I am given I am greeted with this message box..
55
Jacob Coy
Test 18:
Test 18 is to make sure that data that is pulled into the edit weeks form is correct with that of
the database, so as to make sure that no accounting errors are made with a particular
member of staff.
56
Jacob Coy
As proven the data being pulled is exactly the same as that displaying on the form.
Test 19:
Making sure that you can actually save the data that you have just spent time typing into the
form is important as it is not only stressful and frustrating to the end user but it also means
that members of staff at boots are more productive with their time free to do other things.
Making sure that the data is correct in the database also helps as well. To test this I will be
editing a small piece of data on Mark’s week one details, his Monday will change to 3 hours
instead of 2. Hitting the save button should save the details and opening the weeks database
table should show that Monday is now showing as 3 instead of 2.
57
Jacob Coy
58
Jacob Coy
Test 20:
It may be that you want to clear out all the records for a particular week and start again
without having to delete manually each individual text box, as such the clear form button is
there to ease this problem by wiping all the text boxes in one click. This test is to prove that
the form can be cleared using the button.
59
Jacob Coy
Charlie 2009 week 2 all data cleared from text boxes after clicking the clear form button:
60
Jacob Coy
Test 21:
Test 21 is a very important one as it means that you are not able to save a week for a
member of staff if not all of the text boxes have data contained within them. This is a simple
presence check validation rule and should produce a message box.
Without all of the text boxes filled in you cannot continue to save until you have entered a
data value for all of them. This is useful as it will stop problems with half finished weekly
timesheets.
61
Jacob Coy
Test 22:
Making sure I can’t generate a report with half the amount of data need is important as it will
mean that reports wont be printed that are incorrect or useless.
These show the message box that appears telling you, you need to choose a value for every
field on the report section.
Test 23:
62
Jacob Coy
Test 24:
Test 25:
Choosing the values from the drop down boxes selecting Betty and 2009 as the year with
week number 1 I hit generate report and shown below is what will come out of the printer
when used by the end user.
63
Jacob Coy
Test 26:
Choosing the values 2009 and week number one a report is generated for all the hours
worked in the week 1 of 2009 with total calculated also. The form is shown below
checking the calculations on grand total of hours worked shows that they are all adding up
correctly.
Test 27: choosing the values Mark and 2009 a report is generated showing all the weeks
mark has worked in that year and how many hours he has worked in each week. A grand
total of wages for the year for the week and sundays is also shown.
64
Jacob Coy
65
Jacob Coy
I have used a calculator to make sure that the grand totals are correct especially for the
payments as shown in the paper tape below...
Failed Tests:
Initially test 21’s validation did not work causing the program to crash. Going back into the
code I realized that I had the name of one of the text boxes duplicated and I had forgot to
change it, after changing the name to the correct one the validation worked perfectly.
66
Jacob Coy
4. Systems Maintenance
The database itself was created in Access 2007 with the program itself being created in
Visual Basic 2005. Mixing a variety of techniques with existing skills meant I was able to
integrate existing access data and manipulate it using a bespoke piece of software. Most of
the code was manually written as it pulled data from the database itself. A more detailed
breakdown of some of the forms and their psuedo code can be found in the design section
(all real functional code and screenshots of forms is avaliable.....)
4.1.2 Tables:
Shown below are screenshots of all of my tables in the database as well as my entity
relationship diagram.
Table Staff:
The staff table contains all the information about staff as well as their usual working hours for
each day of the week as well as their normal pay.
67
Jacob Coy
Table: Weeks
This table contains all the information that is required to see how many hours each member
of staff works for a particular week in a year.
68
Jacob Coy
69
Jacob Coy
4.2 Forms:
Password Login form:
Main Springboard
70
Jacob Coy
This form displays all the members of staff in the database and allows you to add staff and
then delete staff
71
Jacob Coy
72
Jacob Coy
73
Jacob Coy
4.3 Reports
Working hours report (design view)
74
Jacob Coy
Procedures created:
75
Jacob Coy
5. User Manual:
76
Jacob Coy
6. Appraisal
•A startup home screen with a clear function of allowing the user to navigate to the different
functions of the application simply.
• A form containing all the necessary elements to modify and add members of staff and their
details simply and efficiently
• Form to edit an individuals week and the hours they have worked using numbers instead of
using 15 minute blocks
• The ability to create reports for a particular member of staff cross referenced by the year
month week and day
Objective 1:
I believe that I have managed to fulfill the criteria for objective 1 as I feel that the springboard
form that I created is simple and easy to navigate. This means that staff required to use the
program won’t need specialist IT training as I feel personally that it is a very easy program to
navigate from and you also can’t go wrong with opening too many things at once as it is only
possible to open 1 window at a time.
Objective 2:
Objective 2 required me to create a form that was complicated enough to add and edit staff
whilst maintaining a sense of simplicity to allow for the staff to be able to use it without a huge
amount of training. I believe that I have achieved this very well as it is a simple bound form
that allows for the deletion, addition and editing of staff easily due to its control bar which is
similar to other functions staff may have seen in other windows applications. If I had more
time I would have liked to create a custom form for this instead of using a bound form to do
most of the work for me with my own skin over the top.
77
Jacob Coy
Objective 3:
Objective 3 was achieved through the use of my edit weeks form. I believe that I have
managed to fulfill the needs for the system to remain functional although I have always had
the feeling that something just isn’t right with this form. It works perfectly fine although I do
feel that it could still have been improved further with possible a simpler user interface or
something that doesn’t make this form look so daunting.
Objective 4:
I believe that the reports I have created fulfill the needs of the end user and match this
objective. They are simple to follow and create whilst still having a complex system behind all
the buttons and combo boxes. I believe that I could have created more boots styled forms if I
had more time though.
System security - I believe that the system security is effective to an extent although I
would have liked to extend this form further to allow for a change of passwords using
additional elements or using a form in the database.
Edit Weeks Form - This form performs well and to my expectations although if I had
more time I would have preferred to have improved the design over this and added
extra validation as through extensive testing it does sometimes crash after a lot of use.
Backing Up The Data - The system itself is pretty secure and safe although it is not
protected against problems that are outside of what code can do. For example power
cuts etc. As a result of events such as that the system may lose data or data may not
be saved so I would have preffered to implement a backing up system, preferably one
that backs up all data to a secure FTP location away from the store.
Reports - Although the reports fufil the functions that they require, they just don’t match
the style of the application itself if I had more time then I would have liked to create a
bespoke report design that was in line with the application itself featuring boots logo’s.
In general though I think that I have created the best program for the job and I have done the
best that I could with the time I had available to me and using my skill sets. Of course they
will always be room for improvement but I think I have achieved what was required of me.
78
Jacob Coy
The store was very impressed with the system and they felt that it would be an overall
improvement to all of the paper in the shop. The two primary users were also very impressed
saying it was simple to use yet functional and that it would fit into the general everyday
working cycle of the store.
79
Jacob Coy
Login Form:
Public Class login
Dim passwordprotector As Integer
Private Sub btneditstaff_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btneditstaff.Click
form1.Show()
Me.Hide()
'Me.Enabled = False
Else
MsgBox("Sorry That Was An Incorrect Password")
txtboxlogin.Clear()
passwordprotector = passwordprotector + 1
If passwordprotector = 5 Then
MsgBox("You Have Entered The Password Incorrectly 5 Times Application Is
Closing")
Me.Close()
End If
End If
End Sub
End Class
80
Jacob Coy
Springboard Form:
Public Class form1
81
Jacob Coy
82
Jacob Coy
83
Jacob Coy
arow.Standard_Payment = 0
arow.Overtime_Payment = 0
If cmbyear.Text = "" Then
formatCorrect = False
MsgBox("you have not selected a year")
End If
Try
form1.BootsdbDataSet1.Weeks.Rows.Add(arow)
form1.WeeksTableAdapter1.Update(form1.BootsdbDataSet1.Weeks)
Catch ex As Exception
MsgBox("Year & Week Already Exists In The Database")
Exit Sub
End Try
Next
cmbweek.SelectedText = ""
cmbyear.SelectedText = ""
End Sub
year = DateAndTime.Year(DateValue)
year = year - 3
For i = year To year + 7
cmbyear.Items.Add(i)
Next
End Sub
End Sub
End Class
84
Jacob Coy
cmbyear.SelectedIndex = selIndex
End Sub
Private Sub btngen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btngen.Click
Dim weekNumber As Integer
Dim staffid As Integer
Dim i, theyear As Integer
Dim found As Boolean = False
Try
staffid = cmbstaffid.SelectedValue
theyear = cmbyear.Text
weekNumber = cmbweek.Text
Catch ex As Exception
MsgBox("you havent selected anything")
Exit Sub
End Try
found = False
For i = 0 To form1.BootsdbDataSet1.Weeks.Count - 1
If (staffid = form1.BootsdbDataSet1.Weeks(i).Staff_ID) And
(form1.BootsdbDataSet1.Weeks(i).Week_Number = weekNumber) And
(form1.BootsdbDataSet1.Weeks(i).Year = theyear) Then
85
Jacob Coy
found = True
'txtyear.Text = form1.BootsdbDataSet1.Weeks(i).Year
txtmonday.Text = form1.BootsdbDataSet1.Weeks(i).Monday
txtmondaystart.Text = form1.BootsdbDataSet1.Weeks(i).monday_start
txtmondayfinish.Text = form1.BootsdbDataSet1.Weeks(i).Monday_Finish
txttuesday.Text = form1.BootsdbDataSet1.Weeks(i).Tuesday
txttuesdaystart.Text = form1.BootsdbDataSet1.Weeks(i).Tuesday_start
txttuesdayfinish.Text = form1.BootsdbDataSet1.Weeks(i).Tuesday_Finish
txtwednesday.Text = form1.BootsdbDataSet1.Weeks(i).Wednesday
txtwednesdaystart.Text = form1.BootsdbDataSet1.Weeks(i).Wednesday_start
txtwednesdayfinish.Text = form1.BootsdbDataSet1.Weeks(i).Wednesday_Finish
txtthursday.Text = form1.BootsdbDataSet1.Weeks(i).Thursday
txtthursdaystart.Text = form1.BootsdbDataSet1.Weeks(i).Thursday_start
txtthursdayfinish.Text = form1.BootsdbDataSet1.Weeks(i).Thursday_Finish
txtFriday.Text = form1.BootsdbDataSet1.Weeks(i).Friday
txtfridaystart.Text = form1.BootsdbDataSet1.Weeks(i).Friday_start
txtfridayfinish.Text = form1.BootsdbDataSet1.Weeks(i).Friday_Finish
txtsaturday.Text = form1.BootsdbDataSet1.Weeks(i).Saturday
txtsaturdaystart.Text = form1.BootsdbDataSet1.Weeks(i).Saturday_start
txtsaturdayfinish.Text = form1.BootsdbDataSet1.Weeks(i).Saturday_Finish
txtsunday.Text = form1.BootsdbDataSet1.Weeks(i).Sunday
txtsundaystart.Text = form1.BootsdbDataSet1.Weeks(i).Sunday_start
txtsundayfinish.Text = form1.BootsdbDataSet1.Weeks(i).Sunday_Finish
txtstandard.Text = form1.BootsdbDataSet1.Weeks(i).Standard_Payment
txtovertime.Text = form1.BootsdbDataSet1.Weeks(i).Overtime_Payment
End If
Next
If found = False Then
MsgBox("this week hasnt been created yet in the database!")
Call btnclearform_Click(sender, e)
End If
End Sub
86
Jacob Coy
End If
87
Jacob Coy
88
Jacob Coy
Exit Sub
End If
If txtovertime.Text = "" Then
MsgBox("you have not entered a value for every field on this form!")
Exit Sub
End If
year = cmbyear.Text
weeknumber = cmbweek.Text
Staffid = cmbstaffid.SelectedValue
weeksrow = form1.BootsdbDataSet1.Weeks.FindByWeek_NumberYearStaff_ID(weeknumber,
year, Staffid)
weeksrow.Monday = txtmonday.Text
weeksrow.monday_start = txtmondaystart.Text
weeksrow.Monday_Finish = txtmondayfinish.Text
weeksrow.Tuesday = txttuesday.Text
weeksrow.Tuesday_start = txttuesdaystart.Text
weeksrow.Tuesday_Finish = txttuesdayfinish.Text
weeksrow.Wednesday = txtwednesday.Text
weeksrow.Wednesday_start = txtwednesdaystart.Text
weeksrow.Wednesday_Finish = txtwednesdayfinish.Text
weeksrow.Thursday = txtthursday.Text
weeksrow.Thursday_start = txtthursdaystart.Text
weeksrow.Thursday_Finish = txtthursdayfinish.Text
weeksrow.Friday = txtFriday.Text
weeksrow.Friday_start = txtfridaystart.Text
weeksrow.Friday_Finish = txtfridayfinish.Text
weeksrow.Saturday = txtsaturday.Text
weeksrow.Saturday_start = txtsaturdaystart.Text
weeksrow.Saturday_Finish = txtsaturdayfinish.Text
weeksrow.Sunday = txtsunday.Text
weeksrow.Sunday_start = txtsundaystart.Text
weeksrow.Sunday_Finish = txtsundayfinish.Text
weeksrow.Standard_Payment = txtstandard.Text
weeksrow.Overtime_Payment = txtovertime.Text
form1.WeeksTableAdapter1.Update(weeksrow)
End Sub
Private Sub btnclearform_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnclearform.Click
'txtyear.Clear()
txtmonday.Clear()
txtmondaystart.Clear()
txtmondayfinish.Clear()
89
Jacob Coy
txttuesday.Clear()
txttuesdaystart.Clear()
txttuesdayfinish.Clear()
txtwednesday.Clear()
txtwednesdaystart.Clear()
txtwednesdayfinish.Clear()
txtthursday.Clear()
txtthursdaystart.Clear()
txtthursdayfinish.Clear()
txtFriday.Clear()
txtfridaystart.Clear()
txtfridayfinish.Clear()
txtsaturday.Clear()
txtsaturdaystart.Clear()
txtsaturdayfinish.Clear()
txtsunday.Clear()
txtsundaystart.Clear()
txtsundayfinish.Clear()
txtstandard.Clear()
txtovertime.Clear()
End Sub
End Class
90
Jacob Coy
91
Jacob Coy
accessapp.quit()
accessapp = Nothing
End Sub
End Sub
End Sub
Private Sub form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim year As Integer
Dim i As Integer
Dim DateValue As DateTime = Now
year = DateAndTime.Year(DateValue)
92
Jacob Coy
year = year - 3
For i = year To year + 7
cmbyear.Items.Add(i)
cmbyear2.Items.Add(i)
cmbyear3.Items.Add(i)
Next
End Sub
End Class
93