Employee Management System: Background Study
Employee Management System: Background Study
INTRODUCTION
Background study-
This Project is based on the employee management system of any company or
shop. the owner of the shop is maintain record of employees and workers on daily basis
and this project will help him to maintain the record of an employee in a easily and a
quickly manner, with the help of these software records were updated, edited, added,
deleted very easily.
Project overview-
The project is highly flexible and is well efficient for managing all information
about the employee. The key focus is: well management of data and easy retrieval of
information. The speed and accuracy should be maintained in a proper way. Changes can
be done very easily using the facility and flexibility in V.B. 6.0 and access 2007. The
software can be developed in a neat and simple manner hence it reduces operator’s
work.
Page 1
Employee Management System
Objective of the project-
The main goal of this project is to make the record of employee’s easier & quicker.
Page 2
Employee Management System
PROBLEM ANALYSIS
Study of the proposed system:
This system consists of different table which contains the record of employees & it
is commented through VB which is the front end. In VB we have seen the information
about the employee. You can also provided the different buttons like, add, delete, edit,
exit etc, which helps you to edit any data & make your work easier.
Problem definition:
In the old system the main task of editing is not done easily & it will also take time.
But in the proposed system the main assumptions are, the system should already
contains all the hardware’s & software’s as well as the person who use this product
should familiar with win 98 or win xp or any operating system.
Solution strategies:
The main solution of the problem is to provide suitable & user friendly
environment to a user so that the user can maintain the detail of employee in a very easy
manner.
Page 3
Employee Management System
SYSTEM REQUIREMENT
Hardware Requirement
The configuration given below is the Hardware handled for the system development.
Processor : PENTIUM III or Above
Primary Memory (RAM) : 64 MB or Above
Secondary Memory (Hard disk) : 20 GB or Above
Monitor : COLOR, 15inch or above
Display card : SVGA
Mouse : Any Company
Cabinet : Mini tower ATX
Software Requirement
Operating System : Windows 98 or above
Front End tool : Visual Basic 6.0
Back End tool : MS-Access
Page 4
Employee Management System
SOFTWARE JUSTIFICATION
The Microsoft Windows operating system manages all of these many windows by
assigning each one a unique id number (window handle or hWnd). The system continually
monitors each of these windows for signs of activity or events. Events can occur through
user actions such as a mouse click or a key press, through programmatic control, or even
as a result of another window’s actions.
Each time an event occurs, it causes a message to be sent to the operating system.
The system processes the message and broadcasts it to the other windows. Each window
can then take the appropriate action based on its own instructions for dealing with that
particular message (for example, repainting itself when it has been uncovered by another
window).
Page 5
Employee Management System
Dealing with all of the possible combinations of windows, events and messages could be
very difficult. Many of the messages are handled automatically by Visual Basic; others are
exposed as event procedures for our convenience. This allows us to quickly create
powerful applications without having to deal with unnecessary details.
Because we can’t predict the sequence of events, our code must make certain
assumptions about the “state of the world” when it executes. When we make
assumptions (for example, that an entry field must contain a value before running a
procedure to process that value), we should structure our application in such a way as to
make sure that the assumption will always be valid (for example, disabling the command
button that starts the procedure until the entry field contains a value).
Our code can also trigger events during execution. For example, programmatically
changing the text in a text box cause the text box’s Change event to execute. If you
assumed that this event would only be triggered by user information, you might see
Page 6
Employee Management System
unexpected results. That’s why it is very important to understand the event-driven model
and keep it in mind when we design the application.
INTERACTIVE DEVELOPMENT
The traditional application development process can be broken into three distinct
steps: code writing, compiling the code, and testing code. Unlike traditional languages,
Visual Basic uses an interactive approach to development, blurring the distinction
between the three steps.
With most languages, if we make a mistake in writing the code, the compiler
catches the error when we start to compile the application. We must then find and fix
the error and begin the compile cycle again, repeating the process for each error found.
Visual Basic interprets the code as we enter it, catching and highlighting most syntax or
spelling errors on the fly. It’s almost like having an expert watching over our shoulder as
we write the code.
In addition to catching errors on the fl, Visual Basic also partially compiles the
code as it is entered. When the code is ready to run and test the application, there is only
a brief delay to finish compiling. If the compiler finds an error, it is highlighted in the
code. We can fix the error and continue compiling without having to start over.
Because of the interactive nature of Visual Basic, we can’t test the effects of the code as
we work rather than waiting to compile later.
Page 7
Employee Management System
DATA BASE CONNECTIVITY
Visual Basic supports a lot for data base connectivity; we can use ODBC to connect
with different databases like Oracle, Sybase, Etc. And we have use DAO (Data Access
Objects) mainly used for Microsoft’s jet data base engine. We can use ADO and RDO to
access databases, the following explains about ADO and RDO.
One of the important features in RDO that is not available in DAO is the ability to
handle queries and stored procedures that return multiple result sets. This feature is
commonly used whenever required to load multiple controls (such as combo boxes) with
data from multiple tables. This feature eliminates the redundant processing and network
traffic overhead of using many separate queries.
Page 8
Employee Management System
DYNAMIC LINK LIBRARIES (DLL)
Dynamic Link Libraries (DLL) is linked dynamically as the program executes. Unlike
Static Link Libraries, these libraries provide us a lot of advantages. DLLs are executables,
which can be linked when required. And the main advantage is more than one
application can use the same DLLs. In Visual Basic we can create and use DLLs.
ACTIVE X CONTROLS
An ActiveX control is an execution to the Visual Basic Toolbox. We can use Active
X controls just like any of the standard built-in controls, such as the Check Box control.
When we add is Active X control to a program, it becomes part of the development and
run-time environment and provides new functionality for the application.
Page 9
Employee Management System
MS-Access provides access too many concurrent users to the order of thousands
managing large amount of data could present administrative and performance
challenges.
MS-Access is the default backend for Visual Basic. Creating tables and making data
entries in MS-Access are made easier. It has the advantage of querying. It is faster in
retrieving data. The data can also be external to the database. It has enriched data types.
Page
10
Employee Management System
Input Output
Processing
Page
11
Employee Management System
Updation
Query /Report Design
Administration
Testing
Implementation
Maintenance
System Analysis
System analysis is a logical process; the objective of this phase is not actually to
solve the problem but to determine what must be done to solve the problem. The basic
objective of the analysis stage is to develop the logical model of the system using tools
such as the data flow diagram and elementary data description of the elementary
algorithm. The logical model is Subject to review by both the management and the user
who agree that the model does in fact reflect what should be done to solve the problem.
System analysis is not a precise science. It is in fact more of an art, aided by scientific
approach to find definition and recording data, gathering traditional structures is only one
part of the system analysis, the next step is to examine the data, assess the situation and
looking at the alternatives.
Page
12
Employee Management System
statement of the problem and the task to be performed. Then the requirement is
described in a technical manner in precise statements. After the initial specification
reports are received, they are analyzed and redefined through customer interaction.
Feasibility Study
The main objective of the feasibility study is to treat the technical, Operational,
logical and economic feasibility of developing the computerized system. All systems are
feasible, given unlimited resources and infinite time. It is both necessary and prudent to
evaluate the feasibility of the project at System study phase itself. The feasibility study to
be conduced for this project Involves.
1. Technical Feasibility
2. Operational Feasibility
3. Economic Feasibility
4. Logical Feasibility
Technical Feasibility
Technical feasibility includes Risk Resources availability and technologies. The
management provides latest hardware and software facilities for the successful
completion of the projects. With these latest hardware and software support the system
will perform extremely well. The system is available through Internet.
Operational Feasibility
In the existing manual system it is very difficult to maintain and update huge
amount of information. The development of the system was started because of the
requirement put forward by the management of the concerned department. This system,
will handles the request in a better way and make the process easier thus, it is sure that
the system developed is operationally feasible.
Page
13
Employee Management System
Economic Feasibility
In the economic feasibility the development cost of the system is evaluated
weighing it against the ultimate benefit derived from the new system. It is found that the
benefit, from the new system would be more than the cost and time involved in its
development.
Legal Feasibility
In the legal feasibility it is necessary to check that the software we are going to
develop is legally correct which means that the ideas which we have taken for the
proposed system will be legally implemented or not. So, it is also an important step in
feasibility study.
Page
14
Employee Management System
Design Notations
Data Flow Diagram
Report1
Login
Personal_Detail Change_Password
Employee
Detail
Employee
Professional_Detail Detail Salary_Detail
Report2
Report3
Professional_Detail
Salary_Detail
Report2
Report3
Page
15
Employee Management System
E-R diagram
Name
Address_Local_
Guardian
Age
Name_Local_
Guardian Nationalit
y
Personal_Detail
Mother’s_Nam Address
e
Page
16
Employee Management System
2. Employee’s Professional Detail.
Experience Designation
Professional_Detail
Emp_Id
TA Basic_Sala
ry
DA HRA
Salary_Detail
Page
17
Employee Management System
4. Login Form.
User_name Password
Login
5. Change Password
User_name New_Passwor
d
Password Retype_Ne
w_Passwor
d
Salary_Detail
Page
18
Employee Management System
INPUT DESIGN
Errors committed by data entry operator can be controlled by the input design.
The following approaches have been incorporated into the input design of the proposed
system.
MENU
A menu is a selection list that simplifies the data entry the user can choose from a
list of option, by typing the option letter associated with option in position where the
cursor is located.
This project has both Graphical Menu and also Pull down Menu Graphical Menu is
designed in such a way that, if the user moves the mouse cursor above the main option –
sub options displayed automatically.
FORMATTED SCREEN
Data entry screens have been designed which are similar in formatting source
documents. Help screens have been designed the user to enter data without confusion.
DATA VALIDATION
The input data are validated to minimize errors validation is done. In certain cases
validation is made to check whether the given data is numeric or not.
USER FRIENDLINESS
Appropriate messages are provided to the user to inform of what is happening.
Errors are used to indicate the error code and specific error message.
CONSISTENT FORMAT
A fixed format is adopted for displaying the title and the messages. Each screen
has a status line, which displays the operation that can be performed after data entry.
Page
19
Employee Management System
INTERACTIVE DIALOGUE
The system participates in interactive dialogue and is able to cope with missing or
omitted information. It covers the dialogue by retaining adequate information between
each dialogue.
OUTPUT DESIGN
It is necessary that the output reports be compatible format with the manual
reports. The output has been designed in mind. Output design is the basis by which
many users evaluate the usefulness of the system. The output forms used in this
software are required for query response and reports. The emphasis is required for
producing the hard copy of the information requested or displaying the output on a CRT
screen.
Page
20
Employee Management System
DATABASE STRUTURE
Employee Entry
Department Name
Page
21
Employee Management System
Attendance Entry
Pay slip
Page
22
Employee Management System
CODING
Login
Option Explicit
End Sub
Page
23
Employee Management System
Department_entry.Show
End Sub
End Sub
Employee Entry
Option Explicit
Dim cd As ADODB.Connection
Dim rsd As ADODB.Recordset
Dim rse As ADODB.Recordset
Dim rsen As ADODB.Recordset
Dim rssearch As ADODB.Recordset
Dim rsnamesearch As ADODB.Recordset
Dim count1 As Integer
Dim flagedit, flagsave As Integer
Me.eentry.Enabled = False
Page
24
Employee Management System
Me.searchframe.Visible = False
Me.delete.Enabled = False
Me.save.Enabled = False
Me.delete.Enabled = False
Me.edit.Enabled = False
flagedit = False
flagsave = False
Me.dname.Text = ""
Me.ename.Text = ""
Me.address.Text = ""
Me.city.Text = ""
Me.pincode.Text = ""
Me.phno_r.Text = ""
Me.salary.Text = ""
Me.jdate.Value = Now
Me.edu.Text = ""
Me.remark.Text = ""
End Sub
' ************ for adding record*********
Private Sub add_Click()
Me.searchframe.Visible = False
Me.eentry.Visible = True
Me.eentry.Enabled = True
Me.edit.Enabled = False
flagedit = False
flagsave = False
Page
25
Employee Management System
Me.dname.Enabled = True
Me.ename.Enabled = True
Me.address.Enabled = True
Me.city.Enabled = True
Me.pincode.Enabled = True
Me.phno_r.Enabled = True
Me.salary.Enabled = True
Me.edu.Enabled = True
Me.remark.Enabled = True
Me.phno_o.Enabled = True
Me.phno_m.Enabled = True
Me.dname.SetFocus
Me.delete.Enabled = False
Me.save.Enabled = True
'**** for combo entry****
Set rsd = New ADODB.Recordset
rsd.Open "select * from departmentname", cd, adOpenStatic, adLockOptimistic
If rsd.RecordCount = 0 Then
MsgBox "NO record for department"
Exit Sub
End If
count1 = 0
rsd.Requery
Me.dname.Clear
While (count1 < rsd.RecordCount)
Me.dname.AddItem (rsd.Fields(0))
count1 = count1 + 1
rsd.MoveNext
Wend
'********************
Me.dname.ListIndex = 0
Me.ename.Text = ""
Me.address.Text = ""
Me.city.Text = ""
Me.pincode.Text = ""
Me.phno_r.Text = ""
Me.salary.Text = ""
Me.edu.Text = ""
Me.remark.Text = ""
Page
26
Employee Management System
Me.phno_o.Text = ""
Me.phno_m.Text = ""
End Sub
Private Sub ename_keypress(KeyAscii As Integer)
Dim a As String
a = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
KeyAscii = Asc(Chr(KeyAscii))
If KeyAscii > 26 Then ' if it's not a control code
If InStr(a, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
End Sub
Private Sub ename_lostfocus()
Set rse = New ADODB.Recordset
rse.Open "select * from employeeentry where ename='" & ename.Text & "'", cd,
adOpenStatic, adLockOptimistic
If rse.RecordCount > 0 Then
MsgBox "THIS NAME IS ALREADY STORED!!!"
ename.SetFocus
End If
End Sub
Private Sub city_keypress(KeyAscii As Integer)
Dim a As String
a = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
KeyAscii = Asc(Chr(KeyAscii))
If KeyAscii > 26 Then ' if it's not a control code
If InStr(a, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
End Sub
Page
27
Employee Management System
End If
End If
End Sub
Private Sub phno_r_KeyPress(KeyAscii As Integer)
Dim strValid7 As String
strValid7 = "0123456789()-"
KeyAscii = Asc(Chr(KeyAscii))
If KeyAscii > 26 Then ' if it's not a control code
If InStr(strValid7, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
End Sub
Private Sub phno_o_KeyPress(KeyAscii As Integer)
Dim strValid7 As String
strValid7 = "0123456789()-"
KeyAscii = Asc(Chr(KeyAscii))
If KeyAscii > 26 Then ' if it's not a control code
If InStr(strValid7, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
End Sub
Private Sub phno_m_KeyPress(KeyAscii As Integer)
Dim strValid7 As String
strValid7 = "0123456789()-"
KeyAscii = Asc(Chr(KeyAscii))
If KeyAscii > 26 Then ' if it's not a control code
If InStr(strValid7, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
End Sub
Private Sub salary_KeyPress(KeyAscii As Integer)
Dim strValid7 As String
strValid7 = "0123456789"
KeyAscii = Asc(Chr(KeyAscii))
If KeyAscii > 26 Then ' if it's not a control code
If InStr(strValid7, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
End Sub
Page
28
Employee Management System
Private Sub remark_keypress(KeyAscii As Integer)
Dim a As String
a = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-"
KeyAscii = Asc(Chr(KeyAscii))
If KeyAscii > 26 Then ' if it's not a control code
If InStr(a, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
End Sub
Private Sub save_Click()
If flagsave = False Then
If flagedit = False Then
Page
29
Employee Management System
End If
If Me.salary.Text = "" Then
Me.salary.Text = "0"
End If
rse.Fields(0) = Me.dname.Text
rse.Fields(2) = Me.ename.Text
rse.Fields(3) = Me.address.Text
rse.Fields(4) = Me.city.Text
rse.Fields(5) = Me.pincode.Text
rse.Fields(6) = Me.phno_r.Text
rse.Fields(7) = Me.salary.Text
Me.jdate.Value = Format$(Me.jdate.Value, "d/M/yyyy")
rse.Fields(8) = Format$(Me.jdate.Value, "dd/mmm/yyyy")
rse.Fields(9) = Me.edu.Text
rse.Fields(10) = Me.remark.Text
rse.Fields(11) = Me.phno_o.Text
rse.Fields(12) = Me.phno_m.Text
Else
rse.MoveFirst
While (Not rse.EOF)
If (Me.lstename.Text = rse.Fields(2)) Then
rse.delete
rse.Update
flagedit = False
End If
rse.MoveNext
Wend
rse.AddNew
rse.Fields(0) = Me.lstdname.List(Me.lstdname.ListIndex)
rse.Fields(2) = Text1.Text
rse.Fields(3) = Me.lbladdress.Text
rse.Fields(4) = Me.lblcity.Text
rse.Fields(5) = Me.lblpincode.Text
rse.Fields(6) = Me.lblphno_r.Text
rse.Fields(7) = Me.lblsalary.Text
Me.lbljdate.Text = Format$(Me.lbljdate.Text, "d/M/yyyy")
rse.Fields(8) = Format$(Me.lbljdate.Text, "dd/mmm/yyyy")
Page
30
Employee Management System
rse.Fields(9) = Me.lbledu.Text
rse.Fields(10) = Me.lblremark.Text
rse.Fields(11) = Me.phno_o.Text
rse.Fields(12) = Me.phno_m.Text
Me.Text1.Visible = False
End If
flagsave = True
rse.Update
rse.Requery
MsgBox "record has been saved"
Me.save.Enabled = False
Me.edit.Enabled = False
Me.delete.Enabled = False
Else
MsgBox "record already saved"
End If
Me.dname.Text = ""
Me.ename.Text = ""
Me.address.Text = ""
Me.city.Text = ""
Me.pincode.Text = ""
Me.phno_r.Text = ""
Me.salary.Text = ""
Me.edu.Text = ""
Me.remark.Text = ""
Me.phno_o.Text = ""
Me.phno_m.Text = ""
Me.add.SetFocus
Me.eentry.Enabled = False
End Sub
Private Sub delete_Click()
Dim employee_no, i As Integer
Page
31
Employee Management System
rse.Update
MsgBox "record has been deleted"
End If
rse.MoveNext
Wend
Me.lbladdress.Text = ""
Me.lblcity.Text = ""
Me.lblpincode.Text = ""
Me.lblphno_r.Text = ""
Me.lblsalary.Text = ""
Me.lbljdate.Text = ""
Me.lbledu.Text = ""
Me.lblremark.Text = ""
Me.lblphno_o.Text = ""
Me.lblphno_m.Text = ""
End If
End If
Me.delete.Enabled = False
Me.edit.Enabled = False
End Sub
Me.searchframe.Visible = False
Me.eentry.Enabled = True
Me.eentry.Visible = True
If (rsen.RecordCount = 0) Then
MsgBox "No record"
Exit Sub
End If
Page
32
Employee Management System
Me.dname.List(0) = rsen.Fields(0)
Me.ename.Text = rsen.Fields(2)
Me.address.Text = rsen.Fields(3)
Me.city.Text = rsen.Fields(4)
Me.pincode.Text = rsen.Fields(5)
Me.phno_r.Text = rsen.Fields(6)
Me.salary.Text = rsen.Fields(7)
Me.jdate.Value = Format$(rsen.Fields(8), "dd/mm/yyyy")
Me.edu.Text = rsen.Fields(9)
Me.remark.Text = rsen.Fields(10)
Me.phno_o.Text = rsen.Fields(11)
Me.phno_m.Text = rsen.Fields(12)
End If
Me.dname.Enabled = False
Me.ename.Enabled = False
Me.address.Enabled = False
Me.city.Enabled = False
Me.pincode.Enabled = False
Me.phno_r.Enabled = False
Me.salary.Enabled = False
Me.edu.Enabled = False
Me.remark.Enabled = False
Me.phno_o.Enabled = False
Me.phno_m.Enabled = False
End Sub
Private Sub last_Click()
Me.delete.Enabled = False
Me.edit.Enabled = False
Me.searchframe.Visible = False
Me.eentry.Enabled = True
Me.eentry.Visible = True
If (rsen.RecordCount = 0) Then
MsgBox "No record"
Exit Sub
End If
Page
33
Employee Management System
Me.ename.Text = rsen.Fields(2)
Me.address.Text = rsen.Fields(3)
Me.city.Text = rsen.Fields(4)
Me.pincode.Text = rsen.Fields(5)
Me.phno_r.Text = rsen.Fields(6)
Me.salary.Text = rsen.Fields(7)
Me.jdate.Value = Format$(rsen.Fields(8), "dd/mm/yyyy")
Me.edu.Text = rsen.Fields(9)
Me.remark.Text = rsen.Fields(10)
Me.phno_o.Text = rsen.Fields(11)
Me.phno_m.Text = rsen.Fields(12)
End If
Me.dname.Enabled = False
Me.ename.Enabled = False
Me.address.Enabled = False
Me.city.Enabled = False
Me.pincode.Enabled = False
Me.phno_r.Enabled = False
Me.salary.Enabled = False
Me.edu.Enabled = False
Me.remark.Enabled = False
Me.phno_o.Enabled = False
Me.phno_m.Enabled = False
End Sub
Private Sub privious_Click()
Me.delete.Enabled = False
Me.edit.Enabled = False
Me.searchframe.Visible = False
Me.eentry.Enabled = True
Me.eentry.Visible = True
If (rsen.RecordCount = 0) Then
MsgBox "No record"
Exit Sub
End If
rsen.MovePrevious
If (rsen.BOF = True) Then
rsen.MoveFirst
End If
Me.dname.List(0) = rsen.Fields(0)
Me.ename.Text = rsen.Fields(2)
Page
34
Employee Management System
Me.address.Text = rsen.Fields(3)
Me.city.Text = rsen.Fields(4)
Me.pincode.Text = rsen.Fields(5)
Me.phno_r.Text = rsen.Fields(6)
Me.salary.Text = rsen.Fields(7)
Me.jdate.Value = Format$(rsen.Fields(8), "dd/mm/yyyy")
Me.edu.Text = rsen.Fields(9)
Me.remark.Text = rsen.Fields(10)
Me.phno_o.Text = rsen.Fields(11)
Me.phno_m.Text = rsen.Fields(12)
Me.dname.Enabled = False
Me.ename.Enabled = False
Me.address.Enabled = False
Me.city.Enabled = False
Me.pincode.Enabled = False
Me.phno_r.Enabled = False
Me.salary.Enabled = False
Me.edu.Enabled = False
Me.remark.Enabled = False
Me.phno_o.Enabled = False
Me.phno_m.Enabled = False
End Sub
Private Sub next_Click()
Me.delete.Enabled = False
Me.edit.Enabled = False
Me.searchframe.Visible = False
Me.eentry.Enabled = True
Me.eentry.Visible = True
If (rsen.RecordCount = 0) Then
MsgBox "No record"
Exit Sub
End If
rsen.MoveNext
If (rsen.EOF = True) Then
rsen.MoveLast
End If
Me.dname.List(0) = rsen.Fields(0)
Page
35
Employee Management System
Me.ename.Text = rsen.Fields(2)
Me.address.Text = rsen.Fields(3)
Me.city.Text = rsen.Fields(4)
Me.pincode.Text = rsen.Fields(5)
Me.phno_r.Text = rsen.Fields(6)
Me.salary.Text = rsen.Fields(7)
Me.jdate.Value = Format$(rsen.Fields(8), "dd/mm/yyyy")
Me.edu.Text = rsen.Fields(9)
Me.remark.Text = rsen.Fields(10)
Me.phno_o.Text = rsen.Fields(11)
Me.phno_m.Text = rsen.Fields(12)
Me.dname.Enabled = False
Me.ename.Enabled = False
Me.address.Enabled = False
Me.city.Enabled = False
Me.pincode.Enabled = False
Me.phno_r.Enabled = False
Me.salary.Enabled = False
Me.edu.Enabled = False
Me.remark.Enabled = False
Me.phno_o.Enabled = False
Me.phno_m.Enabled = False
End Sub
Private Sub edit_Click()
flagedit = True
flagsave = False
Me.save.Enabled = True
Me.delete.Enabled = False
Me.eentry.Enabled = False
Me.eentry.Visible = False
Me.searchframe.Visible = True
Me.Text1.Visible = True
Me.Text1.Text = Me.lstename.List(Me.lstename.ListIndex)
Me.lbladdress.Enabled = True
Me.lblcity.Enabled = True
Me.lblpincode.Enabled = True
Me.lblphno_r.Enabled = True
Page
36
Employee Management System
Me.lblsalary.Enabled = True
Me.lbljdate.Enabled = True
Me.lbledu.Enabled = True
Me.lblremark.Enabled = True
Me.lblphno_o.Enabled = True
Me.lblphno_m.Enabled = True
Me.Text1.SetFocus
End Sub
Private Sub exit_Click()
Unload Me
End Sub
Private Sub cmdsearch_Click()
Me.searchframe.Visible = True
Me.searchframe.Enabled = True
Me.eentry.Visible = False
Me.delete.Enabled = True
Me.edit.Enabled = True
Me.save.Enabled = False
Me.lstdname.SetFocus
Me.lstdname.Clear
Page
37
Employee Management System
Me.lblcity.Text = ""
Me.lblpincode.Text = ""
Me.lblphno_r.Text = ""
Me.lblsalary.Text = ""
Me.lbljdate.Text = ""
Me.lbledu.Text = ""
Me.lblremark.Text = ""
Me.lblphno_o.Text = ""
Me.lblphno_m.Text = ""
End Sub
Private Sub lstename_click()
rsnamesearch.MoveFirst
rsnamesearch.Requery
End If
rsnamesearch.MoveNext
Wend
Me.lbladdress.Enabled = False
Me.lblcity.Enabled = False
Me.lblpincode.Enabled = False
Me.lblphno_r.Enabled = False
Me.lblsalary.Enabled = False
Me.lbljdate.Enabled = False
Me.lbledu.Enabled = False
Me.lblremark.Enabled = False
Me.lblphno_o.Enabled = False
Me.lblphno_m.Enabled = False
End Sub
Attendance Entry
Option Explicit
Page
38
Employee Management System
Me.aentry.Enabled = False
Me.searchframe.Visible = False
Me.save.Enabled = False
flagsave = False
flagedit = False
flagsearch = False
Page
39
Employee Management System
rse.Open "select * from employeeentry", cd2, adOpenStatic, adLockOptimistic
Me.atype.AddItem ("AB")
Me.atype.AddItem ("P")
Me.atype.AddItem ("HOLYDAY")
End Sub
Private Sub add_Click()
Me.searchframe.Visible = False
Me.aentry.Visible = True
Me.aentry.Enabled = True
Me.save.Enabled = True
Me.atype.Enabled = False
Me.dname.SetFocus
flagedit = False
End Sub
Private Sub dname_Click()
Me.searchframe.Visible = False
Me.ename.Clear
rse.MoveFirst
While (rse.EOF = False)
If (rse.Fields(0) = dname.Text) Then
Me.ename.AddItem (rse.Fields(2))
End If
rse.MoveNext
Wend
End Sub
Page
40
Employee Management System
rsf.Requery
If rsf.RecordCount = 0 Then
Else
rsf.MoveFirst
count1 = 0
While (count1 < rsf.RecordCount)
If ((Me.ename.Text) = (rsf.Fields(2))) Then
Me.atype.Text = rsf.Fields(4)
Me.avalue.Text = rsf.Fields(5)
Page
41
Employee Management System
Me.lend.Text = rsf.Fields(9)
End If
Me.totalhour.Text = rsf.Fields(10)
End If
count1 = count1 + 1
rsf.MoveNext
Wend
End If
End If
Me.atype.Enabled = True
End Sub
Private Sub DTPicker1_closeup()
Me.searchframe.Visible = False
'********************************
If flagedit = True Then
rsf.Requery
If rsf.RecordCount = 0 Then
Me.dstart.Text = ""
Me.dend.Text = ""
Me.lstart.Text = ""
Me.lend.Text = ""
Else
rsf.MoveFirst
count1 = 0
While (count1 < rsf.RecordCount)
If ((Me.ename.Text) = (rsf.Fields(2))) Then
Me.atype.Text = rsf.Fields(4)
Me.avalue.Text = rsf.Fields(5)
Page
42
Employee Management System
Me.totalhour.Text = rsf.Fields(10)
End If
count1 = count1 + 1
rsf.MoveNext
Wend
End If
End If
Me.atype.Enabled = True
End Sub
Private Sub DTPicker1_change()
Me.searchframe.Visible = False
rsf.Requery
If rsf.RecordCount = 0 Then
Me.dstart.Text = ""
Me.dend.Text = ""
Me.lstart.Text = ""
Page
43
Employee Management System
Me.lend.Text = ""
Else
rsf.MoveFirst
count1 = 0
While (count1 < rsf.RecordCount)
If ((Me.ename.Text) = (rsf.Fields(2))) Then
Me.atype.Text = rsf.Fields(4)
Me.avalue.Text = rsf.Fields(5)
If rsf.Fields(6) = "12:00:00 AM" Then
Me.dstart.Text = "00:00:00 AM"
Else
Me.dstart.Text = rsf.Fields(6)
End If
Me.atype.Enabled = True
End Sub
Private Sub DTPicker1_lostfocus()
Me.searchframe.Visible = False
Page
44
Employee Management System
If rsf.RecordCount = 0 Then
Me.dstart.Text = ""
Me.dend.Text = ""
Me.lstart.Text = ""
Me.lend.Text = ""
Else
rsf.MoveFirst
count1 = 0
While (count1 < rsf.RecordCount)
If ((Me.ename.Text) = (rsf.Fields(2))) Then
Me.atype.Text = rsf.Fields(4)
Me.avalue.Text = rsf.Fields(5)
If rsf.Fields(6) = "12:00:00 AM" Then
Me.dstart.Text = "00:00:00 AM"
Else
Me.dstart.Text = rsf.Fields(6)
End If
Page
45
Employee Management System
Me.totalhour.Text = rsf.Fields(10)
End If
count1 = count1 + 1
rsf.MoveNext
Wend
End If
End If 'end of flag edit stat
Me.dstart.SetFocus
Me.atype.Enabled = True
End Sub
Private Sub atype_click()
End Sub
Private Sub atype_gotfocus()
Page
46
Employee Management System
Else
If (lstart.Text = "00:00:00 AM" Or lstart.Text = "00:00:00 PM" Or lend.Text =
"00:00:00 AM" Or lend.Text = "00:00:00 PM") Then
lunchtime = 0
Else
la = Format$(lstart.Text, "HH:mm")
lb = Format$(lend.Text, "HH:mm")
lunchtime = DateDiff("n", la, lb)
End If
da = Format$(dstart, "HH:mm")
db = Format$(dend, "HH:mm")
daytime = DateDiff("n", da, db)
End Sub
Private Sub avalue_gotfocus()
Me.searchframe.Visible = False
Me.avalue.Clear
Me.avalue.AddItem ("1")
Me.avalue.AddItem ("0.5")
End Sub
Private Sub save_Click()
Page
47
Employee Management System
Me.ename.SetFocus
Exit Sub
End If
Page
48
Employee Management System
If flagedit = False Then
'*********** if record is already there
Set rsg = New ADODB.Recordset
rsg.Open "select * from attendenceentry where date1='" & Format$
(DTPicker1.Value, "d/m/yyyy") & "' ", cd2, adOpenStatic, adLockOptimistic
rsg.Requery
If (rsg.RecordCount = 0) Then
Else
rsg.MoveFirst
count1 = 0
While (count1 < rsg.RecordCount)
If ((Me.ename.Text) = (rsg.Fields(2))) Then
MsgBox "already in record"
Me.add.SetFocus
GoTo here
End If
count1 = count1 + 1
rsg.MoveNext
Wend
'*********************************
End If
rs2.AddNew
rs2.Fields(0) = Me.dname.Text
rs2.Fields(2) = Me.ename.Text
rs2.Fields(3) = Format$(Me.DTPicker1.Value, "dd/mmm/yyyy")
rs2.Fields(4) = Me.atype.Text
rs2.Fields(5) = Me.avalue.Text
rs2.Fields(6) = Me.dstart.Text
rs2.Fields(7) = Me.dend.Text
rs2.Fields(8) = Me.lstart.Text
rs2.Fields(9) = Me.lend.Text
rs2.Fields(10) = Me.totalhour.Text
rs2.Fields(11) = Format$(Me.DTPicker1.Value, "dd/M/yyyy")
rs2.Update
Page
49
Employee Management System
count1 = 0
rsh.Requery
While (count1 < rsh.RecordCount)
If ((Me.ename.Text) = (rsh.Fields(2))) Then
rsh.delete
End If
count1 = count1 + 1
rsh.MoveNext
Wend
'****************************
rs2.AddNew
rs2.Fields(0) = Me.dname.Text
rs2.Fields(2) = Me.ename.Text
rs2.Fields(3) = Format$(Me.DTPicker1.Value, "dd/mmm/yyyy")
rs2.Fields(4) = Me.atype.Text
rs2.Fields(5) = Me.avalue.Text
rs2.Fields(6) = Me.dstart.Text
rs2.Fields(7) = Me.dend.Text
rs2.Fields(8) = Me.lstart.Text
rs2.Fields(9) = Me.lend.Text
rs2.Fields(10) = Me.totalhour.Text
rs2.Fields(11) = Format$(Me.DTPicker1.Value, "dd/M/yyyy")
rs2.Update
'rs2.Sort
MsgBox "record has been saved"
End If
here:
Me.aentry.Enabled = False
Me.dname.Text = ""
Me.ename.Text = ""
Me.atype.Text = ""
Me.avalue.Text = ""
Me.dstart.Text = ""
Page
50
Employee Management System
Me.dend.Text = ""
Me.lstart.Text = ""
Me.lend.Text = ""
Me.totalhour.Text = ""
End Sub
Private Sub edit_Click()
Me.searchframe.Visible = False
Me.aentry.Visible = True
aentry.Enabled = True
Me.save.Enabled = True
flagedit = True
Me.dname.SetFocus
End Sub
Me.cmbename.Clear
rsd.Requery
If (rsd.RecordCount = 0) Then
Else
rsd.MoveFirst
While (rsd.EOF = False)
Me.cmbdname.AddItem (rsd.Fields(0))
rsd.MoveNext
Wend
End If
Me.cmbdname.SetFocus
End Sub
Private Sub cmbdname_click()
Me.cmbename.Clear
If (rsd.RecordCount = 0) Then
Else
rse.MoveFirst
Page
51
Employee Management System
While (rse.EOF = False)
If (rse.Fields(0) = cmbdname.Text) Then
Me.cmbename.AddItem (rse.Fields(2))
End If
rse.MoveNext
Wend
End If
End Sub
Private Sub DTPicker2_CLOSEUP()
flagsearch = False
rsi.Requery
If (rsi.RecordCount = 0) Then
Me.txtdstart.Text = ""
Me.txtdend.Text = ""
Me.txtlstart.Text = ""
Me.txtlend.Text = ""
Me.txtatype.Text = ""
Me.txtavalue.Text = ""
'Me.DTPicker2.SetFocus
Else
count1 = 0
While (count1 < rsi.RecordCount)
Page
52
Employee Management System
Me.txtdend.Text = "00:00:00 AM"
Else
Me.txtdend.Text = rsi.Fields(7)
End If
Me.txttotalhour.Text = rsi.Fields(10)
flagsearch = True
End If
count1 = count1 + 1
rsi.MoveNext
Wend
rsi.Requery
If (rsi.RecordCount = 0) Then
Me.txtdstart.Text = ""
Me.txtdend.Text = ""
Page
53
Employee Management System
Me.txtlstart.Text = ""
Me.txtlend.Text = ""
Me.txtatype.Text = ""
Me.txtavalue.Text = ""
'Me.DTPicker2.SetFocus
Else
count1 = 0
While (count1 < rsi.RecordCount)
End If
count1 = count1 + 1
rsi.MoveNext
Wend
Page
54
Employee Management System
'If flagsearch = False Then
' Me.cmbename.SetFocus
'End If
End If
End Sub
Private Sub DTPicker2_lostfocus()
flagsearch = False
rsi.Requery
If (rsi.RecordCount = 0) Then
Me.txtdstart.Text = ""
Me.txtdend.Text = ""
Me.txtlstart.Text = ""
Me.txtlend.Text = ""
Me.txtatype.Text = ""
Me.txtavalue.Text = ""
'Me.DTPicker2.SetFocus
Else
count1 = 0
While (count1 < rsi.RecordCount)
Page
55
Employee Management System
Else
Me.txtlstart.Text = rsi.Fields(8)
End If
End If
count1 = count1 + 1
rsi.MoveNext
Wend
Page
56
Employee Management System
OUTPUT
1. Login Form
Page
57
Employee Management System
2. MDI Form
Page
58
Employee Management System
3. Employee Entry Form
Page
59
Employee Management System
4. Attendance Entry Form
Page
60
Employee Management System
5. Department Entry Form
Page
61
Employee Management System
6. Pay slip form
Page
62
Employee Management System
Page
63
Employee Management System
Page
64
Employee Management System
9. Attendance Report
Page
65
Employee Management System
Page
66
Employee Management System
SYSTEM TESTING
Software testing is a crucial element of software quality assurance and represents
the ultimate review of specification, design and coding. The increasing visibility of
software as a system element and the attendant "cost" associated with a software failure
are motivating forces for well-planned, thorough testing. Testing is a set of activities that
can be planned in advance and conducted systematically. Testing begins at the module
level and work towards the integration of entire computers based system. Nothing is
complete without testing, as it is vital success of the system.
Unit Testing
Unit testing focuses on the verification of smallest unit of software design of the
module. To check whether each module in the software works properly so that it gives
desired outputs to the given inputs. All validations and conditions are tested in the
module level in unit test. Control paths are tested to ensure the information properly
flows into and out of the program unit under test. Boundary condition are tested to
ensure that the modules operates at boundary establishes to restrict processing. All
independent paths through control structure are exercised to ensure that all statements
in a module have been executed at least once. And finally all errors handling paths are
tested. In our system, Unit testing has been successfully handled. The test data was given
to each module in all respects and have got desired output. Each module has been found
working properly.
Page
67
Employee Management System
the following categories: incorrect or missing functions, interface errors, errors in data
structure or external database access, performance errors and initialization errors and
termination errors. In our system, Black Box testing has been successfully handled. The
test input data was given has got desired output.
SYSTEM IMPLEMENTATION
Implementation Procedures & Operational Documentation
Implementation is the phase where the system goes for actual functioning. Hence
in this phase one has to be cautious because all the efforts undertaken during the project
will be fruitful only if the software is properly implemented according to the plans made.
The system testing checks the readiness and accuracy of the system to access,
update and retrieve data from new files. Once the programs become available, the test
data are read into the computer and process.
SYSTEM MAINTENANCE
We may define Software Maintenance by describing four activities that are
undertaken after a program is released for use.
Page
68
Employee Management System
Corrective Maintenance
The first maintenance activity occurs since it is unreasonable to assume that
software testing will uncover all errors in a large software system. The process of
including the diagnosis and correction of one or more errors is called corrective
maintenance.
Adaptive Maintenance
This activity that contributes to the definition of maintenance occurs since rapid
change is encountered in every aspect of computing. Therefore, adaptive maintenance
modifies software to properly interface with the changing environment.
Perfective Maintenance
This activity involves recommendations for new capabilities, modifications to the
existing functions and general enhancements when the software is used. To satisfy these
requests, perfective maintenance is performed.
Preventive Maintenance
This activity occurs when software is changed to improve further maintainability
or reliability. If the only available element of a Software Configuration is the source code,
maintenance activity begins with the evaluation of the code, often complicated by poor
internal documentation. The subtle characteristics such as program structure, global data
structure, system interfaces and performance & design constraints are difficult to handle
and are often misinterpreted. The amounts of changes that are made to the code are
difficult to access.
Page
69
Employee Management System
CONCLUSION
The Employee Management System didn’t automate 100% of their work, but it is
really a good start to computerize everything and entire Detail can be 100%
computerized. As far as the work done so far much care was given about the user
friendliness and a very good interaction with the end users. The interface are so designed
and channeled the users can never make any mistake while using the application, for an
example while adding new record, user’s can’t go out without either saving or canceling
the operation, till the time either they save or cancel the current operation all other
operations are blocked. There is no chance of making any mistake in the application.
This system is entirely designed for STAND ALONE usage, according to the need of
the customer if needed the same system can be designed with Network facility to handle
the branch activities also.
Page
70
Employee Management System
REFERENCES
Visual Basic 6.0 Programming Black Book by steven holzner –dreamtech
publications
Mastering VB 6.0 by Evangelos petroutsos- BPB publications
Introduction to Visual Basic framework-Worx publication
Ms Office XP complete BPB publication ISBN 81-7656-564-4
Ms Access 2002 fast & easy by Faithe Wempen PHI .ISBN 81-203-1893
System Analysis & Design by Pearson Education
msdn.microsoft.com/net/
www.vbtutor.net
www.officetutorials.com/accesstutorials.htm
www.computer-training-software.com/access-2003.htm
Page
71