You are on page 1of 64

EMPLOYEE Management system

A Project Report Submitted in Partial Fulfillment


Of the Requirements for the Award of
Degree of
Bachelor of Computer Application

Of the

Bastar University

Submitted by
Nitesh Bhura
&
Kuvendra Kumar Patle

UNDER THE GUIDENCE OF


Ms. Garima Gupta

Department of Computer Science


CHRIST COLLEGE, JAGDALPUR
SESSION: 2009-10
Employee Management System 201
0

CERTIFICATE -1

CERTIFICATE OF APPROVAL

This is to certify that the project work entitled “Employee Management


System” submitted by Nitesh Bhura & Yogesh Verma in partial fulfillment
of the requirements for the award of the degree of Bachelor of Computer
Application, session 2009-10 at Christ College, to Bastar University,
jagdalpur is a record of the student’s own work. This work has not been
submitted to any other University or institute for the award of any degree or
diploma to the best of my knowledge.

(Signature of HOD with Date)


(Name)
(College)

Page
2
Employee Management System 201
0

CERTIFICATE –2

CERTIFICATE OF EVALUATION

This is to certify that the project report entitled “Employee Management


System” being submitted by Nitesh Bhura & Yogesh Verma in partial
fulfillment of the requirements for the award of the degree of Bachelor of
Computer Application, session 2009-10 at Christ College, to Bastar
University, jagdalpur, is a record of the student’s own work. This work has
not been submitted to any other University or institute for the award of any
degree or diploma to the best of my knowledge.

Internal Examiner External Examiner


Date: Date:
Designation: Designation:

Page
3
Employee Management System 201
0

CERTIFICATE – 3

CERTIFICATE OF ORIGINALITY

This is to certify that the project report entitled “Employee Management


System” in partial fulfillment of the requirements for the award of the degree
of Bachelor of Computer Application, session 2009-10 to Bastar University,
jagdalpur, is carried out by _______________ at _____________, under my
supervision & guidance.
The matter embodied in this project is genuine work done by the student and
has not been submitted to this or any other University or institute for the
award of any degree or diploma to the best of my knowledge.

Signature of Project Guide


Date:
Name:
Designation

Page
4
Employee Management System 201
0

CERTIFICATE – 4

SELF CERTIFICATE

This to certify that the project report entitled “Employee Management


System” is done by us is an authentic work carried out for the partial
fulfillment of the requirements for the award of the degree Bachelor of
Computer Application, under the guidance of Ms. Garima Gupta.

Name of the student Roll No. Signature of the


student
1. Nitesh Bhura
2. Yogesh Verma

Page
5
Employee Management System 201
0

ACKNOWLEDGEMENT

The austerity and satisfaction that one gets on


completing a project cannot be fulfilled without
mentioning the people who made it possible, with
gratitude, we are very much thankful to the Almighty
God who helped us all the way throughout the project
and who has molded us into what we are today.

We are privileged to express our sincere


gratitude to honorable Rev. Fr.Abraham Kannampala,
Principal, Christ College, Jagdalpur for all
encouragement he gave us. We express our sincere
thanks to extreme gratitude to Mr.Sushil Sahu
(H.O.D.) of Computer Science for all his valuable
suggestions and guidance throughout our project.

We wish to express our hearty gratitude to our


internal project guide, Ms. Garima Gupta for his
valuable suggestions and guidance throughout the
tenure of our project .We extend our sincere thanks to
all the college staff members who helped us to
complete this project successfully.

Page
6
Employee Management System 201
0

Finally, we express our sincere thanks to our entire


friends and all the other people who had imparted
their knowledge and expertise upon us.

CONTENTS

CHAPTER – 1 INTRODUCTION

1.1 Background Study

1.1.1 The Organization Profile


1.1.2 Study of existing System

1.2 Project Overview


1.3 Objective of the project

CHAPTER – 2 PROBLEM ANALYSES

2.1 Study of the proposed System

2.1.1 Problem Definition


2.1.2 Solution Strategies

2.2 System Requirements

2.2.1 Hardware Requirements

Page
7
Employee Management System 201
0

2.2.2 Software Requirements

2.3 Software Justification


2.4 Cost Estimating & Scheduling

CHAPTER – 3 DESIGN & DEVELOPMENT PROCESS

3.1 Design Notations


3.1.1Data Flow Diagram
3.1.2E-R diagram
3.2 Design Process
3.2.1 Database design
3.2.2 Input design
3.2.3 Output design

CHAPTER – 4 TESTING & IMPLEMENTATION

4.1 System Testing


4.2 System implementation
4.2.1Implementation procedures
4.2.2Operational documentation
4.3 System Maintenance

CHAPTER - 5 CONCLUSIONS

Scope for further Enhancement

Page
8
Employee Management System 201
0

Bibliography

Chapter – 1

Page
9
Employee Management System 201
0

1.1 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.

1.1.1 The organization profile-


The main work of this organization is
maintaining the records of employees and the work of maintaining records is
done on the register.

1.1.2 Study of the existing system-


The method of maintaining the record in the
organization is by writing all details in register but in this they find some
difficulty to add new records, delete any existing record or for editing (or) doing
any changes in records. If they want to do any of the above tasks, they are
writing the whole things again and it will take time also.

1.2 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

Page
10
Employee Management System 201
0
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.

1.3 Objective of the project-


The main goal of this project is to make the record
of employee’s easier & quicker.

• It is situated for all level of peoples.

• It provides proper details about all the employee & their posts.

• User friendly environment makes the data handling more easily.

• It easily provides an environment where the user can get information about
all the employees/workers.

Chapter-2

Page
11
Employee Management System 201
0

2.1- 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.

2.1.1- 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.

Page
12
Employee Management System 201
0
2.1.2- 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.

2.2 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

2.3 SOFTWARE JUSTIFICATION

Page
13
Employee Management System 201
0
Operating System

As the company is presently has its showroom in One place, STAND ALONE
system is proposed with WINDOWS 98 operating system.

Front End tool

Visual Basic 6.0

Microsoft Visual Basic 6.0 is the powerful programming language to develop application
for windows. Windows is the operating system, which runs based on messages and with
rich user interface. Here are little details about how windows works and programming
model using Visual Basic.

How Windows Works


WINDOWS, EVENTS AND MESSAGES
Windows involves three key concepts: windows, events and messages.
Think of a window as a rectangular region with its own boundaries. For example, Explorer
window in Windows, a Document window within word processing program, or a dialog
box that pops up to remind you of an appointment. A command button is also a window.
Icons, text boxes, option buttons and menu are all windows.
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.

Page
14
Employee Management System 201
0
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).
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.

UNDERSTANDING THE EVENT-DRIVEN MODEL


In traditional or “procedural” applications, the application itself controls which portions of
code execute and in what sequence. Execution starts with the first line of code and follows
a predefined path through the application, calling procedures as needed.
In an event-driven application, the code doesn’t follow a predetermined path – it executes
different code sections in response to events. Events can be triggered by the user’s actions,
by messages from the system or other applications, or even from the application itself. The
sequence of these events determines the sequence in which the code executes, thus the path
through the application’s code differs each time the program runs.
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
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.

Page
15
Employee Management System 201
0
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.

USER INTERFACE ELEMENTS


Visual Basic provides us a lot of User Interface elements, which are easier to create and
use. For example Forms, Menus, dialog boxes and supporting controls such as Check
Box, List Box, Edit Box, Etc.

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.

ACTIVE X DATA OBJECTS (ADO)


Active X Data objects (ADO) enable client applications to access and manipulate data
from a database server through an OLE DB provider. Its primary benefits are ease of use,
high speed, low memory overhead, and a small disk footprint. ADO supports key features
for building client/server and Web-based applications.
ADO also features Remote Data Service (RDS), by which we an move data from a server
to a client application or Web page, manipulate the data on the client, and return updates to
the server in a single round trip.

REMOTE DATA OBJECTS (RDO)


RDO is a popular way to build efficient data access to relational ODBC databases. With
RDO, we can create simple cursor less result sets, or more complex batch or client-side

Page
16
Employee Management System 201
0
cursors. We can limit the number or rows returned and monitor all of the messages and
errors generated by the remote data source without compromising the executing query.
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.

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.

Active X controls leverage our capabilities as a Visual Basic programmer by retaining


some familiar properties, events, and methods, such as the Name property, which behave,
as we would expect. Then, however, the Active X controls feature methods and properties
that greatly increase our flexibility and capability as a Visual Basic Programmer. We can
create Active X control more easily in Visual Basic.

Back End Tool

Page
17
Employee Management System 201
0
MS-Access
On a program of software that can help us to access data and perform operations it is called
a “Data Base Management System”. The DBMS whose design is based on the
Relational Theory is called “The Relational Database Management System” or
RDBMS.
MS-Access is a RDBMS, offers capabilities of both Relational and Object Oriented
database systems. It supports very large databases that could contain hundreds of
terabytes of information. The records are represented in a flat two dimensional table
with rows and columns. Each column has an unique name. All elements in each
column are of same kind.
MS-Access provides access to 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 more
faster in retrieving data. The data can also be external to the database. It has enriched
data types.

2.4 COST ESTIMATION AND SCHEDULING

Project estimation and scheduling were carried out together by the project leader as
Per the norms of the company. Some cost estimation was done at the early stage
before the schedules were drawn up. Once the project was underway, estimates
were updated. The factors involved in computing the total cost of a software project
were
* Hardware & software cost,
* Maintenance cost,
* Travel and training cost and
* Effort cost.
Scheduling as well as estimating the effort required to develop the software system
were done by the project leader in discussion with the Company officials.

Page
18
Employee Management System 201
0

CHAPTER - 3

Page
19
Employee Management System 201
0

3.1 Design Notations

3.1.1 Data Flow Diagram

Report1

Login
Login

Personal_Detail Change_Password
Personal_Detail Change_Password

Employee
Detail

Professional_Detail Salary_Detail
Professional_Detail Salary_Detail

Report2
Report3

Page
20
Employee Management System 201
0

3.1.2 E-R diagram

1. Employee’s Personal Detail.

Qualificati Emp_Id D_O_B


on
Name
Address_Lo
cal_
Guardian
Age

Name_Lo
cal_ Nationalit
Guardian y
Personal_Detail

Mother’s_Nam Address
e

Phone_n
Father’s_Nam
Occupation o
e

Page
21
Employee Management System 201
0

2. Employee’s Professional Detail.

Emp_Id Departmen
D_o_j
t

Experience Designation

Professional_Detail

3. Employee’s Salary Detail.

Emp_Id
TA Basic_Sala
ry

DA HRA

Salary_Detail

Page
22
Employee Management System 201
0

4. Login Form.

User_name Password

Login

5. Change_Password.

New_Passwor
User_name
d

Retype_Ne
Password w_Passwor
d

Salary_Detail

Page
23
Employee Management System 201
0

3.2 Design Process

3.2.1 Database design

1. Login Form

Field Name Data type Size


User_name Text 20
Password Text 10

2. Change_Password

Field Name Data type Size


User_Name Text 20
Password Text 10
New_Password Text 10
Retype_New_Password Text 10

3. Professional_Detail

Field Name Data type Size


Emp_Id Text 20
Designation Text 30
Department Text 20
d_o_j Date/Time 8

Page
24
Employee Management System 201
0
Experience Text 20

4. Personal_Detail

Field Name Data type Size


Emp_id Integer 2
Name Text 50
Age Integer 2
Nationality Text 20
Address Text 50
Phone_no Text 15
Father’s_name Text 50
Occupation Text 50
Mother’s_name Text 50
Name_Local_Guardian Text 50
Address_Local_Guardia Text 50
n
Qualification Text 50
D_O_B Date/Time 8

5. Salary_Detail

Field Name Data type Size


Emp_Id Text 20
Basic_Salary Text 10
TA Text 10

Page
25
Employee Management System 201
0
DA Text 10
HRA Text 10

3.2.2 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.

Page
26
Employee Management System 201
0
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.

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.

3.2.3 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
27
Employee Management System 201
0

CHAPTER – 4

Page
28
Employee Management System 201
0

4.1 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.

Black Box Testing


Black Box Testing methods focus on the functional requirements of the software.

Page
29
Employee Management System 201
0
This testing enables the software engineer to derive sets of input conditions that will fully
exercise all functional requirements for a program. This testing attempts to find errors in
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.

User Acceptance Testing


The performance of user interactive testing is actually the user show. The user
gives live data and checks whether software is giving specified outputs.

4.2 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 implementation phase is less creative than system design. It is primarily
concerned with user training, site preparation and file conversion. Depending on the nature
of the system, extensive user training may be required. The initial parameters of the MIS
should be modified as the result of programming efforts; programming provides a reality
test for the assumptions made by the analyst.

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.

4.3 SYSTEM MAINTENANCE


We may define Software Maintenance by describing four activities that are

Page
30
Employee Management System 201
0
undertaken after a program is released for use.

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
31
Employee Management System 201
0

CHAPTER – 5

Page
32
Employee Management System 201
0

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.

SCOPE FOR FUTHER ENHANCEMENT


Search details can be enhanced by detailed identification of searching problems and
rectification steps by company.

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
33
Employee Management System 201
0

CODINGS

OF

FORMS

Page
34
Employee Management System 201
0

Splash Form

Private Sub Timer1_Timer ()

t=t+1

If t = 1000 Then End

Unload Me

frmLogin.Show

End Sub

Page
35
Employee Management System 201
0

Login Form

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub cmdcancel_Click ()


End
End Sub

Private Sub cmdOk_Click ()


rs.Open "select * from login", con, adOpenDynamic, adLockOptimistic
If txtname.Text = rs (0) Then
If txtpassword.Text = rs (1) Then
Unload Me
MDIemployee_detail.Show
Else
MsgBox "Invalid Password"
txtpassword.SetFocus
txtpassword.Text = ""
rs.Close
End If
Else
MsgBox "Invalid user name"
txtname.SetFocus
txtname.Text = ""

Page
36
Employee Management System 201
0
End If
End Sub

Private Sub Form_Load ()


con.Open "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=E:\kkk\vb\Mydbempdetail.mdb"
End Sub

Private Sub Form_Unload (Cancel as Integer)


con.Close
Me.Hide
End Sub

MDI Form

Private Sub about_us_Click ()


frmAbout.Show
End Sub

Private Sub change_password_Click ()


frmchange_password.Show
End Sub

Private Sub exit_Click ()


Dim a As Integer
a = MsgBox ("Do you want to exit", vbCritical + vbYesNo, "Exit")
If a = vbYes Then
Unload Me
End If
End Sub

Private Sub personal_detail_Click ()


frmpersonal_detail.Show
End Sub

Private Sub professional_detail_Click ()

Page
37
Employee Management System 201
0
frmprofessional_detail.Show
End Sub

Private Sub Report1_Click ()


DataReport1.Show
End Sub

Private Sub Report2_Click ()


DataReport2.Show
End Sub

Private Sub Report3_Click ()


DataReport3.Show
End Sub

Private Sub salary_detail_Click ()


frm_salary_detail.Show
End Sub
Change Password Form

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub cmdchange_password_Click()


Dim a As String
rs.Open "select * from login", con, adOpenDynamic, adLockOptimistic
If Trim(txtname.Text) = rs(0) Then
If Trim(txtpassword.Text) = rs(1) Then
a = MsgBox("Do you want to change your password", vbYesNoCancel + vbCritical,
"Change Password")
If a = vbYes Then
rs(1) = Trim(txtnew_pass.Text)
rs.Update
Else
Exit Sub
End If
Else
MsgBox "Invalid Password"
Exit Sub
End If
Else

Page
38
Employee Management System 201
0
MsgBox "Invalid Username"
End If
cmdReset_Click
rs.Close
End Sub

Private Sub cmdExit_Click()


Dim a As Integer
a = MsgBox("Do you want to exit", vbCritical + vbYesNo, "Exit")
If a = vbYes Then
Unload Me
End If
End Sub

Private Sub cmdReset_Click()


txtname.Text = ""
txtpassword.Text = ""
txtnew_pass.Text = ""
txtretype_pass.Text = ""
End Sub

Public Sub store()


txtname.Text = rs(0)
txtpassword.Text = rs(1)
txtnew_pass.Text = rs(2)
txtretype_pass.Text = rs(3)
End Sub

Private Sub Form_Load()


con.Open "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=E:\kkk\vb\Mydbempdetail.mdb"
End Sub

Private Sub Form_Unload(Cancel As Integer)


con.Close

Page
39
Employee Management System 201
0
End Sub

Personal Detail Form

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub cmd_add_Click ()


Clear
rs.Open "select max (Emp_id) from Personal_Detail", con, adOpenDynamic,
adLockOptimistic
If rs (0) <> Null Then
txt_emp_id.Text = 101
Else
txt_emp_id.Text = rs(0) + 1
End If
rs.Close
cmdSave.Enabled = True
End Sub

Private Sub cmd_delete_record_Click ()


On Error GoTo 11

Page
40
Employee Management System 201
0
Dim a As Integer
a = MsgBox ("Do you want to delete the record", vbYesNo + vbCritical, "Delete")
If a = vbYes Then
rs.Open "select* from Personal_Detail where emp_id=" & Val (txt_emp_id.Text) & "",
con, adOpenDynamic, adLockOptimistic
rs.Delete
rs.Close
Clear
End If
Exit Sub
11:
MsgBox "Invalid Record", vbCritical, "Delete"
End Sub

Private Sub cmd_exit_Click ()


Dim a As Integer
a = MsgBox ("Do you want to exit", vbCritical + vbYesNo, "Exit")
If a = vbYes Then
Unload Me
End If
End Sub

Private Sub cmd_modify_record_Click ()


Dim a As Integer
rs.Open "select* from Personal_Detail where Emp_id=" & Val (txt_emp_id.Text) & "",
con, adOpenDynamic, adLockOptimistic
rs.Delete
rs.Close
rs.Open "select * from Personal_Detail", con, adOpenDynamic, adLockOptimistic
rs.AddNew
store
rs.Update
MsgBox "Record Modified", vbInformation, "Record modified"
Clear
cmdSave.Enabled = False
rs.Close
End Sub

Private Sub cmd_print_Click ()


DataReport1.Show
End Sub

Page
41
Employee Management System 201
0

Private Sub cmdSave_Click ()


Dim a As Integer
rs.Open "select * from Personal_Detail where emp_id = " & Val (txt_emp_id.Text) & " ",
con, adOpenDynamic, adLockOptimistic
While Not rs.EOF
If rs (0) = txt_emp_id.Text Then
a = MsgBox ("Record Is Duplicate", vbYesNo + vbCritical, "Duplicate Record")
Clear
rs.Close
Exit Sub
End If
rs.MoveNext
Wend
rs.AddNew
store
rs.Update
MsgBox "Record Saved", vbInformation, "Record Saved"
Clear
rs.Close
cmdSave.Enabled = False
End Sub

Private Sub cmdview_Click ()


On Error GoTo 12
List1.Clear
On Error GoTo 0
rs.Open "select Emp_id from Personal_Detail", con, adOpenDynamic, adLockOptimistic
While Not rs.EOF
List1.AddItem rs (0)
rs.MoveNext
Wend
rs.Close
List1.Visible = True
12:
End Sub

Private Sub Form_Load ()


List1.Visible = False
con.Open "provider= microsoft.jet.oledb.4.0;
data source=e:\kkk\vb\MydbEmpDetail.mdb"

Page
42
Employee Management System 201
0
rs.Open "select max (Emp_id) from Personal_Detail", con, adOpenDynamic,
adLockOptimistic
If rs (0) <> Null Then
txt_emp_id.Text = rs (0) + 1
Else
txt_emp_id.Text = 101
rs.Close
End If
cmdSave.Enabled = False
End Sub

Private Sub Form_Unload (Cancel as Integer)


List1.Clear
con.Close
End Sub

Private Sub List1_Click ()


i = List1.ListIndex
Emp_Id = List1.Text
rs.Open "select * from Personal_Detail where Emp_id=" + List1.Text + "", con,
adOpenDynamic, adLockOptimistic
txt_emp_id = rs (0)
txtname = rs(1)
txtage = rs(2)
txtnationality = rs(3)
txtaddress = rs(4)
txtphoneno = rs(5)
txtfathername = rs(6)
txtoccupation = rs(7)
txtmothername = rs(8)
txtlocal_g = rs(9)
txtlocaladdress = rs(10)
txtqualification = rs(11)

Page
43
Employee Management System 201
0
DTPicker1.Value = rs (12)
rs.Close
List1.Visible = False
End Sub

Public Sub Clear ()


txt_emp_id = ""
txtname = ""
txtage = ""
txtnationality = ""
txtaddress = ""
txtphoneno = ""
txtfathername = ""
txtoccupation = ""
txtmothername = ""
txtlocal_g = ""
txtlocaladdress = ""
txtqualification = ""
DTPicker1.Value = Date
End Sub

Public Sub store()


rs(0) = txt_emp_id
rs(1) = txtname
rs(2) = txtage
rs(3) = txtnationality
rs(4) = txtaddress
rs(5) = txtphoneno
rs(6) = txtfathername
rs(7) = txtoccupation
rs(8) = txtmothername
rs(9) = txtlocal_g
rs(10) = txtlocaladdress
rs(11) = txtqualification
rs(12) = DTPicker1.Value
End Sub

Page
44
Employee Management System 201
0

Professional Detail Form

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub cmd_add_Click ()


Clear
rs.Open "select max(Emp_Id) from Professional_Detail", con, adOpenDynamic,
adLockOptimistic
If rs(0) <> Null Then
txt_emp_id.Text = rs(0) + 1
Else
txt_emp_id.Text = 101
End If

Page
45
Employee Management System 201
0
rs.Close
cmd_save.Enabled = True
End Sub

Private Sub cmd_delete_record_Click()


On Error GoTo 11
Dim a As Integer
a = MsgBox("Do you want to delete the record", vbYesNo + vbCritical, "Delete")
If a = vbYes Then
rs.Open "select* from Professional_Detail where Emp_Id=" & Val(txt_emp_id.Text) & "",
con, adOpenDynamic, adLockOptimistic
rs.Delete
rs.Close
Clear
End If
Exit Sub
11:
MsgBox "Invalid Record", vbCritical, "Delete"
End Sub

Private Sub cmd_exit_Click()


Dim a As Integer
a = MsgBox("Do you want to exit", vbCritical + vbYesNo, "Exit")
If a = vbYes Then
Unload Me
End If
End Sub

Private Sub cmd_modify_record_Click()


Dim a As Integer
rs.Open "select* from Professional_Detail where Emp_Id=" & Val(txt_emp_id.Text) & "",
con, adOpenDynamic, adLockOptimistic
rs.Delete
rs.Close
rs.Open "select * from Professional_Detail", con, adOpenDynamic, adLockOptimistic
rs.AddNew
store
rs.Update
MsgBox "Record Modified", vbInformation, "Record modified"
Clear
cmd_save.Enabled = False
rs.Close

Page
46
Employee Management System 201
0
End Sub

Private Sub cmd_save_Click()


Dim a As Integer
rs.Open "select * from Professional_Detail where Emp_Id=" & Val(txt_emp_id.Text) &
"", con, adOpenDynamic, adLockOptimistic
While Not rs.EOF
If rs(0) = txt_emp_id.Text Then
a = MsgBox("Record is Duplicate", vbYesNo + vbCritical, "Duplicate Record")
Clear
rs.Close
Exit Sub
End If
rs.MoveNext
Wend
rs.AddNew
store
rs.Update
MsgBox "Record Saved", vbInformation, "Record Saved"
Clear
rs.Close
cmd_save.Enabled = False
End Sub

Private Sub cmd_view_Click()


On Error GoTo 12
List1.Clear
On Error GoTo 0
rs.Open "select Emp_Id from Professional_Detail", con, adOpenDynamic,
adLockOptimistic
While Not rs.EOF
List1.AddItem rs(0)
rs.MoveNext
Wend
rs.Close
List1.Visible = True
12:

Page
47
Employee Management System 201
0
End Sub

Private Sub Form_Load()


List1.Visible = False
con.Open "provider= microsoft.jet.oledb.4.0;
data source=e:\kkk\vb\MydbEmpDetail.mdb"
rs.Open "select max(Emp_Id) from Professional_Detail", con, adOpenDynamic,
adLockOptimistic
If rs(0) <> Null Then
txt_emp_id.Text = rs(0) + 1
Else
txt_emp_id.Text = 101
rs.Close
End If
cmd_save.Enabled = False
End Sub

Private Sub Form_Unload(Cancel As Integer)


List1.Clear
con.Close
End Sub

Private Sub List1_Click()


i = List1.ListIndex
Emp_Id = List1.Text
rs.Open "select * from Professional_Detail where Emp_Id=" + List1.Text + "", con,
adOpenDynamic, adLockOptimistic
txt_emp_id = rs(0)
txt_designation = rs(1)
txt_department = rs(2)
DTPicker1.Value = rs(3)
txt_experience = rs(4)
rs.Close
List1.Visible = False

Page
48
Employee Management System 201
0
End Sub

Public Sub Clear()


txt_emp_id = ""
txt_designation = ""
txt_department = ""
DTPicker1.Value = Date
txt_experience = ""
End Sub

Public Sub store()


rs(0) = txt_emp_id
rs(1) = txt_designation
rs(2) = txt_department
rs(3) = DTPicker1.Value
rs(4) = txt_experience
End Sub

Salary Detail Form

Private Sub cmd_add_record_Click()


Data1.Recordset.AddNew
cmd_save.Enabled = True
End Sub

Private Sub cmd_delete_record_Click()


Data1.Recordset.Delete
MsgBox ("Your Record have been Deleted")

Page
49
Employee Management System 201
0
End Sub

Private Sub cmd_exit_Click()


Dim a As Integer
a = MsgBox("Do you want to exit", vbCritical + vbYesNo, "Exit")
If a = vbYes Then
Unload Me
End If
End Sub

Private Sub cmd_modify_record_Click()


Data1.Recordset.Edit
MsgBox ("Your Record have been Modified")
End Sub

Private Sub cmd_save_Click()


Data1.Recordset.Update
MsgBox ("Your Record have been saved")
End Sub

Private Sub cmd_total_Click()


a = Val(txt_bs)
b = Val(txt_ta)
c = Val(txt_da)
d = Val(txt_hra)
lbl_Total.Caption = Val(txt_bs) + Val(txt_ta) + Val(txt_da) + Val(txt_hra)
End Sub

Private Sub Form_Load()


con.Open "provider= microsoft.jet.oledb.4.0; data
source=e:\kkk\vb\MydbEmpDetail.mdb"
rs.Open "select max(Emp_id) from Salary_Detail", con, adOpenDynamic,
adLockOptimistic
If rs(0) <> Null Then
txt_emp_id.Text = rs(0) + 1
Else
txt_emp_id.Text = 101

Page
50
Employee Management System 201
0
rs.Close
End If
cmd_save.Enabled = False
End Sub

Page
51
Employee Management System 201
0

MODE
OF
OPERATION

Splash Form

This form displays Splash Screen.

Page
52
Employee Management System 201
0

Login Form

Page
53
Employee Management System 201
0
In this form user may enter User name & Password. If user name & password
matched with the database then user may enter in Software & while entering
into the software user may perform further operation. In this way we can
provide Authentication facility to the user.

MDI Form

Page
54
Employee Management System 201
0

This form contains all the sub forms related to this Project. This form contains
different menus & each menu contains a sub menu. While click on the menu,
menu will display a sub menu, while clicking on the sub menu we can
perform different operation.

Page
55
Employee Management System 201
0

Change Password Form

In this form user enter user name & old Password, & if old password matched
with the database, then user may change his Password.

Page
56
Employee Management System 201
0

Personal Detail Form

This form contains the Personal Detail of an Employee. In this form we can
Add, Save, Modify, Delete, View our data & we can take the Printout also.

Page
57
Employee Management System 201
0

Professional Detail Form

This form contains the Professional Detail of an Employee. In this form we


can Add, Save, Modify, Delete, View our data & we can take the Printout
also.

Page
58
Employee Management System 201
0

Salary Detail Form

This form contains the Salary Detail of an Employee. In this form we can
Add, Save, Modify, Delete, View our data & we can take the Printout also.

Page
59
Employee Management System 201
0

About Us Form

This form displays short description about our Project.

Page
60
Employee Management System 201
0

Generated Reports

With the help of Data Environment we can generate Data Report & the
Reports of different Forms are as shown below:

Report of Personal Detail Form

Page
61
Employee Management System 201
0

Report of Professional Detail Form

Page
62
Employee Management System 201
0

Report of Salary Detail Form

Page
63
Employee Management System 201
0

BIBLIOGRAPHY

Informatics Practices - Sumita Arora


(A Book of Visual Basic)

VB Black Book - Steven Holzner

 

Page
64

You might also like