You are on page 1of 50

 

PROJECT REPORT ON

PAYROLL MANAGEMENT SYSTEM

1
 
 

CONTENTS
CHAPTER NAME

 SYSTEM STUDY
 Existing System
 Drawbacks Of Existing System
 Need for a New System

 INTRODUCTION TO PAYROLL MANAGEMENT SYSTEM


 Features

 PROPOSED SYSTEM
 Working
 Objective/Advantages of New System

 SYSTEM ANALYSIS
 Analysis
 Problem Understanding

 REQUIREMENT ANALYSIS
 Requirements Specification
 Constraints

 SYSTEM DESIGN

 PLATFORM USED
 Hardware Requirement
 Software Requirement

 DFD (DATA FLOW DIAGRAM)

2
 
 

 E-R DIAGRAM

 TABLE USED
 EMP_IFO Table
 DIALY_MUSTER Table
 SAL_DETAIL Table
 PAYROLL Table

 FORMS LAYOUTS
 LOG IN Form
 WELCOME Form
 EMPLOYEE INFORMATION Form
 ADD SALARY DETAIL
 EMPLOYEE SALARY DETAIL VIEW Form
 EMPLOYEE INFO DETAIL VIEW Form
 SEARCH FOR EMPLOYEE ID Form
 SEARCH FOR ABSENT ID Form
 SHOW SALARY DETAIL Form
 PAYROLL Form
 PAYROLL REPORT Form
 ATTENDANCE REPORT OF EMPLOYEE Form
 DESIGNATION WISE BASIC INFO Form

 CODING
 Coding For LOG IN Form
 Code For User Name And Passward Correctness
 Coding For Form EMPLOYE INFORMAION
 Coding For Connection String Declaration
 Code For ID
 Code For Add New Data
 Code For Validate(Only Number Allow)
 Convert Small Case To Capital
 Code For Close

3
 
 

 Coding For Form ADD SALARY DETAIL


 Coding For Connection String Declaration
 Coding For Getting Employee ID In Combo box
 Coding For Getting Employee Information
 Code For Adding New Data
 Code For Calling Search Box
 Code For Clear
 Coding For Form DAILY MUSTER
 Coding For Connection String Declaration
 Code For System Date
 Code For Calculation Of Total Hours Works
 Code For New Data And Ensure Data Not Repeated
 Coding For Form EMPLOYEE INFO DETAIL AND SAL DETAIL VIEW
 Coding For Connection String Declaration
 Code For To Load Data In Grid View
 Code For To Add Or Update New Data
 Code For Saves To New Added Or Updated Data
 Code For Delete Data
 Coding For Form SEARCH BOX
 Coding For Connection String Declaration
 Code For Search Employee Id
 Code For Getting a List Of All Employee ID
 Code For Getting a List Of All Present ID
 Code For Getting a List Of All Absent ID
 Coding For Form SALARY DETAIL
 Coding For Connection String Declaration
 Code For Basic Info And Salary Detail Of Particular Employee
 Coding For Form PAYROLL
 Coding For Connection String Declaration
 Code For Show Particular Employee Information
 Coding For Count Absent Days
 Coding For Count Present Days
 Coding For Count leaves Days
4
 
 

 Coding For All Sum All Days Hours Work


 Coding For Calculate Net Salary
 Coding For Save Data
 Coating For Print Preview And Print
 Code For The All REPORT
 Code For Employee Information Report
 Code For Employee Attendance Report
 Code For Employee Designation Wise Information Report

 FUTURE DIRECTION

 CONCLUSION
 

 BIBLIOGRAPHY

5
 
 

SYNOPSIS

Payroll is very simple, flexible and user-friendly Management software. That takes care of
all your requirements relating to accounting and management of employees’ Payroll.
Payroll stores complete records of the employees, generates Pay-slips and Attendance
Register, Computes all allowances and deductions and generates all statutory reports.

Payroll is only salary processing software with good and wide-industry range of clients. It
offers very high flexibility in defining various allowances, deductions; leave rules etc. for
the employees and all formula for P.F etc. are definable and changeable at User's end.

Payroll Application has been designed for the purpose of maintaining details of various
allowances and deductions that needs to be given to the employees of the organization.
Also, it generates the salary Sheet of the employees of the organization that assists the
accounts department in many ways.

Main Objectives:-

There are multiple objectives behind the designing and implementation of the Module:

 To prepare the detailed salary record of all the employees in an organization

 To generate Pay-In-Slip through the calculation of salary

 Proper usage of manpower

 To maintain Allowances, Deductions, Loans, Savings and Arrears details for the

employees

 To generate reports in user-defined formats

 To generate various important reports that provides valuable information to the top-

level management.

6
 
 

SYSTEM STUDY

7
 
 

Chapter 1

SYSTEM STUDY

In system study we study the existing system and new proposed system. In system study
we study that what are the drawbacks, and limitations exist. What are the needs of the
existing system? And also study what is the new proposed system, and how new proposed
system removes the limitations and drawbacks of the existing system. In this Section we
study the advantages of the new proposed system.

1.1 Existing system

This Organization is maintaining most of their day-to-day transactions data in the registers
(i.e. manually). The employees of the organization are doing the whole work manually. All
the work is done manually (i.e. maintained in registers) so different employees are
appointed for the maintenance of registers containing all the information related to the
organization.

It is very time consuming and is also not error free in some situations. In existing manual
system databases calculations are difficult to perform so report generation as very much
difficult.

1.2Drawbacks of Existing System

Generally whenever we implement a new system it is developed to eliminate the


shortcomings of an existing system. The computerized system has more edge over the
manual system. It is because of accuracy, high speed, quick result, diligence etc. The
existing system is totally based on manual system. Existing system has many drawbacks in
comparison of computerized system

1. Time Consuming: High time consumption is the main weakness of the existing
system. A lot of time is wasted in searching records from different files, which resulted
in loss of time, and moreover workload also increases. Also a lot of time is wasted in

8
 
 

duplicating the same entries in different registers. The overall checking of the records
and modifications if necessary has to be made at several places which is time
consuming and error prone.

2. Service and Working Conditions: With the unusual delay due to various reasons
(such as non-availability of record or absence of an employee etc) the customer suffers
a lot. Without any firm reason he has to wait which disfigures the working conditions.

3. Difficulties in Retrieving Information: Sometimes, to get any of any type of instant


information more than one document needs to be searched. This requires the opening
of both files and then combining the information to get the required information.
Further the files may not be indexed according to the need, which causes difficulty in
retrieving information.

4. Difficult for the Top Management to analyze data: Top management faces lots of
problems to know about the details of the Current Transactions, Current Bookings,
Current Cancellation and Employee as all is maintained at the lower level. Except for
the media and their reliable resources they have nobody to ask about the current
outputs and the overall results to be generated along with the reports at the end of the
year.

5. Not Easy to understandable by new user: To understand the manual system the user
have to get more practice and have a grape all fields that help by other employee and
have to be in contact with that person. If the person was in leave the user can get the
information from him.

6. Need more space to store: Here by using the paperwork system the user need to
maintain all the documents in proper way to avoid the difficulty in action and need
more space to store these documents because they can’t destroy the old documents

7. Very Expensive: The existing manual system is very expensive method as lot of
paper work has to be done and lot of wastage of manpower, which increase the
expanses of existing system.

9
 
 

8. Data sharing: The different user in the different department cannot share data
simultaneously.

9. Security feature are not prominent in the existing system.

1.3Need For a New System

To enhance the working of the fine Tech organization, which was completely handled
manually, the improvement was thought on the basis of computerizing the major activities.
The following factors were foreseen for the improvisation:

1. Identify the Opportunity to Improve Business Functions: It has been identified


that computerization process is necessity and what business benefits can be derived
by implementing this improvement. It will lead to better transaction handling in
terms of speed, reliability and accuracy.

2. Improves Services and Working Conditions: To improve the working conditions


of existing system in every parts of Tour & Travel Org. Customer services are need
to improve to a greater extent.

3. User friendly: To make the system user friendly this system using window as its
run time environment and is developed using Visual Studio 2008, which is very
user-friendly rapid application developed tool. Because in the existing system
register work was very difficult to handled by each user and was boring job.

4. Data Security: The proposed will also prevent unauthorized access to the system.
At the very beginning, the user name and password is to be entered by the user and
if it is correct only then the permission to use the software is given to user. There
are different users according to different roles and one user can’t use the resources
given to another user.

10
 
 

5. Data Redundancy: - The data is stored only once which can be accessed by any
one at any time and at any place. So it can be minimized but cannot be removed
completely
.
6. Easy to Access: - In this database project, data can be easily access through
computer networking.

7. Cost Reduction: - It requires less amount of Cost as compared to existing system

.
8. Time & Efforts Reduction: - It requires fewer amounts of time and efforts.

9. Security mechanism: - Database can be secured by applying password, encryption


and decryption techniques.

10. Concurrency Control: - This Database provides mechanisms to provide concurrent


access and ensure the correctness of the data.

11
 
 

INTRODUCTION

12
 
 

Chapter 2

INTRODUCTION TO PAYROLL MANAGEMENT

SYSTEM

A user friendly GUI (Graphical User Interface) based software “Payroll Management
System” has been developed for organization, keeping in view the requirements of
employees to prepare salary. The objective of the project was to computerize the payroll
system which was earlier being handled manually every precaution has been taken at each
process involved in the complex task of salary preparation. By computerization it implies
that all process handling is entirely being done by computer. All the records necessary for
the processes involved in the salary calculation are stored in a computer based record
keeping system using a back-end tool. All the processes handling is done at the front-end
by using a front-end. The project provides sample facilities to its users. The most
important of the facilities are the report generation and printing which provides user with
the hard copies of the data also.

2.1Features:

 Preparation of salary.

 Printing of Windows Based user friendly software.

 Maintenance of rich electronic records of employees available at station.

 Pay slips.

 Attendance record.

 Standard report generation

13
 
 

PROPOSED SYSTEM

14
 
 

Chapter 3

PROPOSED SYSTEM

This consists of Payroll System. All these transactions need to be carefully understood and
taken into consideration. The system also contains a lot of data redundancy at various
stages. One of the objectives of the new system would be to stores data in an efficient and
non-redundant form and hence increase overall efficiency of the system.

The new system should ensure of simple and easy data entry procedures through
suggestive looking form. There are quite a number of lengthy calculations being done on
the acquired data. These calculations should be thoroughly understood. The new system
should be able to perform all these calculations automatically and efficiently.
Numerous kinds of queries are done on large amounts of accumulated data, to find out the
desired data. The new system should provide efficient, simple, fast and smarter procedures
for retrieval of exhaustive types of data from the database.

Finally, there are quite a number of reports that are generated during the normal working
of the system. Each of these required reports should be understood very carefully and the
new system shall provide easy and efficient methods for generation of these reports.

3.1 Working
The working of the project is based on payroll system for performing its working it use
Visual Basic.NET as a front-end and SQL as a back-end. In which user perform all its
functions in Visual Basic.NET environment and all database stores in the database oracle.
This proposed system reserve the ticket on request of the user and also refund the
unconfirmed orders after lasing the commission them. All the calculations are
automatically and efficiently performed. The new computerized system has an edge over
the manual system. The beneficial features of new computerized system are the following:

15
 
 

1. Improves Services and Working Conditions: The proposed system improves the
existing working conditions in each step of inventory control system Customer services are
improved to a greater extent. The whole process is very easy and efficient.

2. User Friendly: The new system is using windows as its runtime environment and is
developed using Visual Basic.NET which is very user friendly rapid application
development tool. The new system is totally graphical and user just has to select his
desired option and the next step will be taken immediately and automatically by the
system.

3. Less Time Consumption: Another aspect of system, which will reduce the time
consumption, is its speed. The speed of system is measured in terms of response time i.e.
the time it takes to respond to user’s request. Computer is an electronic device which can
manipulate, modifies, retrieve and store information very speedily so it will be able to
report within a fraction of time.

3.2 Objective/Advantages of New System:

To overcome these above stated limitations in the Payroll Management System, we


propose a new system that is computerized system of “Payroll Management System”.
The proposed system would store all the information captured in different registers that
will be linked with each other and will provide direct and immediate access. Using a
computerized system, we will do storing of data. All the addition, deletion, modification,
printing will be done through computer for faster accessing. This proposed system would
set free from all the burdens mentioned in limitations of existing system.

1. Fast and Efficient: As compared to existing manual system, in proposed system the
user can get the information fast, easily and efficiently from the computer since
information is a single click away from the user.

2. Reliable and Accurate: As in proposed system the information is stored and processed
in computers so that data will be more reliable and accurate.

16
 
 

3. Centralized Data: In the existing system most of data records are kept in registers and
some data are maintained in Microsoft Excel due to this system the placement of the data
is not at one particular place. But in proposed system each and every record is maintained
on computer, which leads to the centralization of data and every user which have the
access to system can retrieve the data at ease.

4. Low Operation and Maintenance Cost: The proposed system is not very costly as it
doesn’t includes many costs and overhead expenses like file management, stationary
charges etc.

5. Non-Redundant Information: As in proposed system data maintained on the


computers so inconsistency doesn’t occurs whichever leads to problem like duplication of
data. As in our project most of the inventory codes are Auto Generated hence
There is no chance of duplication of the master records.

6. User Friendly: Proposed system is very user friendly. We have applied many check and
balances (i.e. validation rules) in the proposed system so that a less knowledgeable person
can also enter the data error free and at an ease.

7. Easy to Access: As compared to existing system, in proposed system the user


can easily and efficiently access the information from the computer only if the user is
given the right of the same. In the proposed system we have used the concept of level of
access. We have created the users to access the database. So depending upon the type of
hierarchy we can assign different rights for the user.

8. No Documentation: As everything is stored on the computer so there is any need of


documentation or maintaining the files or registers.

17
 
 

REQUIREMENT ANALYSIS

18
 
 

Chapter 5

REQUIREMENT ANALYSIS

5.1 Requirements Specification

The proposed project full fill all the requirement of the user although it related to booking
of the tickets or with calculations and it also provides all the necessary features which is
needed by the user of the software It is a structured, precise document, which defines each
and every system service and constraint in detail. It may also be known as
The functional specification and is generally used as basis for a contract between the user
and the software developer.

Functional Requirements
The proposed project fulfills all the functional requirements of the organization. These are
those requirements that define the functionality of the software system. Like of a,
Attendance of a employee, making Pay slip. They are descriptions of the project functions.

Non-Functional Requirements
These are those requirements that place a constraint under the system operates for example
response time or on the development process such as the choice of the programming
language.

5.2 Constrain

The company functions manually. This system has a lot of problems as the work done is
very time consuming and sometimes errors also creep in. so there was an urgent need to
develop a system, which is simple, error free and suits the working of the institution. The
software “Payroll Management System” is such software, which will serve to these
purposes. Constraints are validations, which are used to check that the software is working
properly. The software also has some constraints, which make it a successful application.

19
 
 

PLATFORM USED

20
 
 

Chapter 7

PLATFORM USED

7.1Hardware Requirement

Hardware is the term given to the machinery itself and to the various individual pieces of
equipment. It refers to the physical devices of a computer system. Thus, the input, storage
processing control and the output devices are hardware.

Following are the minimum hardware and software specifications that are required for
efficient performance of the system. Using a higher configuration than specified below can
enhance the system performance further.

HARDWARE SPECIFICATIONS

CPU Intel Pentium IV 1.80 GHz or higher


RAM 1 GB (for best performance)
Keyboard 105 Standard keys
Hard disk 10GB or higher free space

7.2 Software Requirement

Software means a collection of program where the objective is to enhance the capabilities
of the hardware machine. The following defines the software of the proposed system
developments:

Software Specification

 Operating System Window 98, XP


 Visual Basic.NET 2005, 2008
 SQL

21
 
 

LANGUAGES USED

SQL: SQL (Structured Query Language) is a query language. It can define the structure of
the data, modify data in the database and specify security constraints. SQL is a simple and
powerful database access language and the standard language for relational database
management system. SQL uses a combination of relational calculus constructs all the
operations made to the data in an oracle database are performed using SQL declaration.

FRONT-END TOOLS

Visual Basic.NET
Visual basic.NET is the latest incarnation of the world’s most popular computer
programming language, and it brings a lot of new features to the table. This new things
called “dot.net” is a revolutionary change from Visual Studio 6.0 (which included Visual
Basic 6.0). Visual Basic .NET is not “Visual Studio 7.0” as you might think. On the
contrary, it is a new product developed from scratch, not tied to the previous version (and
not entirely compatible either). In a sense, you might think of this as a whole new product
line starting at version 1.0—but that’s only partially true. The people who created Visual
Basic .NET took all of the favorite features of Visual Basic 6.0 and the features of a dozen
other popular language, and crammed all of this new goodness into a single new
development tool. The result is a stellar programming language, and it has no equivalent in
the computer world.

FEATURES OF Visual Basic.NET:


 Powerful Windows-based Applications
 Building Web-based Applications
 Simplified Deployment
 Powerful, Flexible, Simplified Data Access
 Improved Coding
 Direct Access to the Platform
 Full Object-Oriented Constructs
 XML Web Services
 Mobile Applications

22
 
 

 COM Interoperability
 Reuse Existing Investments
 Upgrade Wizard

Advantage of Visual Basic.NET:

1. First of all, VB.NET provides managed code execution that runs under the Common
Language Runtime (CLR), resulting in robust, stable and secure applications. All features
of the .NET framework are readily available in VB.NET.

2. VB.NET is totally object oriented.

3. The .NET framework comes with ADO.NET, which follows the disconnected paradigm,
i.e. once the required records are fetched the connection no longer exists. It also retrieves
the records that are expected to be accessed in the immediate future. This enhances
Scalability of the application to a great extent.

4. VB.NET uses XML to transfer data between the various layers in the DNA Architecture
i.e. data are passed as simple text strings.

5. Error handling has changed in VB.NET. A new Try-Catch-Finally block has been
introduced to handle errors and exceptions as a unit, allowing appropriate action to be
taken at the place the error occurred thus discouraging the use of ON ERROR GOTO
statement. This again credits to the maintainability of the code.

6. Security has become more robust in VB.NET. In addition to the role based security in
VB6, VB.NET comes with a new security model, Code Access security. This security
controls on what the code can access. For example you can set the security to a component
such that the component cannot access the database. This type of security is important
because it allows building components that can be trusted to various degrees.

23
 
 

(DFD) / DATA FLOW DIAGRAM

24
 
 

Chapter 8

DFD (DATA FLOW DIAGRAM)

25
 
 

TABLE USED

26
 
 

Chapter 10

TABLE USED

10.1Table Name: EMP_INFO

Primary Key: - EMP _ID

Purpose: - This table contains the personal information of the employee

10.2Table Name: DAILY_MUSTER

Purpose: - This table contains the employee daily attendance


27
 
 

FORM LAYOUTS

28
 
 

Chapter 11

FORM LAYOUTS

11.1 FORM NAME: - LOG IN

Purpose: - This form is used to check the authorization of user. If the user is an authorized
person he/she is given access to the system otherwise not.

29
 
 

11.4 FORM NAME: - ADD SALARY DETAIL

Purpose: - This form is contain the salary information of the employee

11.5 FORM NAME: - EMPLOYEE SALARY DETAIL

Purpose: - This form is show the detail salary information of the employee

30
 
 

11.6 FORM NAME: - EMPLOYEE INFO DETAIL

Purpose: - This form is show the detail basic Information of Employee

11.12 REPORT NAME: - ATTENDANCE REPORT OF EMPLOYEE

31
 
 

Purpose: - With the help of this report you can get particular employees attendance for
particular month.

11.13 REPORT NAME: - DESIGNATION WISE BASIC INFO

Purpose: - With the help of this report you can get basic information of employee in the
group of designation.

32
 
 

Chapter 12

CODEING

12.1COADING FOR LOG IN FORM

12.1.1 Code for User Name And Passward Correctness

If UsernameTextBox.Text = "" Then


MessageBox.Show("You cannot leave USER NAME bank", "PAYROLL
MANAGEMENT SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Hand)
End If
If PasswordTextBox.Text = "" Then
MessageBox.Show("You cannot leave PASSWARD bank", "PAYROLL
MANAGEMENT SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Hand)
End If
If (UsernameTextBox.Text = "bca" Or UsernameTextBox.Text = "BCA") And
(PasswordTextBox.Text = "project" Or PasswordTextBox.Text = "PROJECT") Then
MDIParent1.Show()
Me.Hide()
ElseIf MessageBox.Show("Wrong UserID or Password", "PAYROLL
MANAGEMENT SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Warning) Then

UsernameTextBox.Text = ""
PasswordTextBox.Text = ""

12.2 COADING FOR FORM EMPLOYEE INFORMATION

12.2.1 Coding for Connection String Declaration

Dim con As New SqlClient.SqlConnection("Data


Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\USER\My
Documents\Visual Studio 2005\Projects\PAY\PAY\payrolldatabse.mdf;Integrated
Security=True;User Instance=True")

12.2.2 Code for ID

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
Dim randomvalue As New Random 'create random object
Dim randomhold As Integer
'generate random number
For i As Integer = 0 To 9999
randomhold = randomvalue.Next(1, 9999)

33
 
 

TextBox1.Text = randomhold
Next
Button1.Enabled = True
End Sub

12.2.3Code for Add New Data

If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox7.Text =


"" Or MaskedTextBox1.Text = "" Then
MessageBox.Show("Text box can not be null", "PAYROLL MANAGEMENT
SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
Else
Dim cmd As New SqlCommand()
cmd.Connection = con
con.Open()

cmd.CommandText = "insert into EMP_INFO values ('" & TextBox1.Text & "','"
& TextBox2.Text & "','" & TextBox3.Text & "','" & DateTimePicker1.Text & "','" &
DateTimePicker2.Text & "','" & ComboBox1.Text & "','" & TextBox7.Text & "','" &
MaskedTextBox1.Text & "')"
cmd.ExecuteNonQuery()

If MessageBox.Show("RAGISTRATION OF BASIC INFORMATION IS COMPLETE",


"RAGISTRATION COMPLTE(PAYROLL SYSTEM)", MessageBoxButtons.OK,
MessageBoxIcon.Asterisk) Then
con.Close()
ADD_SAL_DETAIL.Show()
TextBox2.Text = ""
TextBox3.Text = ""
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
TextBox7.Text = ""
MaskedTextBox1.Text = ""
Else
MessageBox.Show("THIS EMPLOYEE IS ALLREADY IN DATABASE .",
"PAYROLL SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
TextBox2.Text = ""
TextBox3.Text = ""
DateTimePicker1.Text = ""
DateTimePicker2.Text = ""
TextBox7.Text = ""
MaskedTextBox1.Text = ""
End If
End If

End Sub

12.2.4 Code for Validate (only Number allow)

34
 
 

If (Char.IsPunctuation(e.KeyChar) = True Or Char.IsLetter(e.KeyChar) = True) And


Asc(e.KeyChar) <> 8 Then
e.Handled = True
MsgBox("Enter Numbers Only", , "WRONG INPUT!")
End If

12.2.5Code for Convert Small Case to Capital

Dim s As String
s = TextBox2.Text
s = s.ToUpper
TextBox2.Text = s

12.2.6 Code for Close

Me.Close()

12.3COADING FOR FORM ADD SALARY DETAIL

12.3.1 Coding for Connection String Declaration

Dim con As New SqlClient.SqlConnection("Data


Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\USER\My
Documents\Visual Studio 2005\Projects\PAY\PAY\payrolldatabse.mdf;Integrated
Security=True;User Instance=True")

12.3.2 For Getting Employee Id in Combo Box

Dim strSQL As String = "SELECT * FROM EMP_INFO"


Dim da As New System.Data.SqlClient.SqlDataAdapter(strSQL, conn)
Dim ds As New DataSet
da.Fill(ds, "EMP_INFO")
With Me.ComboBox1
.DataSource = ds.Tables("EMP_INFO")
.DisplayMember = "EMP_ID"
.ValueMember = "EMP_ID"
If .SelectedIndex = 0 Then
Else
MessageBox.Show("ADD EMPLOYEE FIRST!", "NOT FOUND",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
Me.Close()
End If
End With

12.3.3 For Getting Employee Information by Button Click

Try

35
 
 

Dim cmd As New SqlClient.SqlCommand()


cmd.Connection = con
con.Open()
cmd.CommandText = "SELECT * FROM EMP_INFO WHERE EMP_ID=(" +
ComboBox1.Text + ");"
cmd.ExecuteNonQuery()
Dim da As SqlClient.SqlDataAdapter = New
SqlClient.SqlDataAdapter(cmd.CommandText, con)
Dim ds As DataSet = New DataSet
da.Fill(ds, "EMP_INFO")
Dim dt As DataTable = ds.Tables("EMP_INFO")
Dim row As DataRow
For Each row In dt.Rows
TextBox1.Text = row("FIRST NAME")
TextBox2.Text = row("LAST NAME")
TextBox3.Text = row("DESGNATION")
Next row

If ds.Tables("EMP_INFO").Rows.Count = 0 Then
MessageBox.Show("Sorry No Record Found Please Try Again!", " PAYROLL
SYSTEM ", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
' Close connection
con.Close()
Catch ex As SqlClient.SqlException
MessageBox.Show("Employee Not found" + ex.Message)
End Try

12.3.4 For Adding New Data

If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text =


"" Or TextBox5.Text = "" Or TextBox6.Text = "" Or TextBox7.Text = "" Or
TextBox8.Text = "" Then
MessageBox.Show("Text box can not be null", "PAYROLL MANAGEMENT
SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
Else
Dim cmd As New SqlClient.SqlCommand()
cmd.Connection = con
con.Open()
cmd.CommandText = "insert into SAL_DETAIL values ('" &
ComboBox1.Text & "','" & TextBox1.Text & "','" & TextBox2.Text & "','" &
TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text
& "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "','" &
TextBox10.Text & "')"
cmd.ExecuteNonQuery()

36
 
 

MessageBox.Show("ADDITION OF SALARY DETAIL IS COMPLETE", "SALARY


DETAIL COMPLETE(PAYROLL SYSTEM)", MessageBoxButtons.OK,
MessageBoxIcon.Asterisk)
con.Close()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""

12.3.5Code for Calling Search Box

SEARCHBOX.Show()

12.3.6 Code For Clear

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""

End Sub

37
 
 

12.4 CODE FOR FORM DAILY MUSTER

12.4.1 Coding for Connection String Declaration

Dim con As New SqlClient.SqlConnection("Data


Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\USER\My
Documents\Visual Studio 2005\Projects\PAY\PAY\payrolldatabse.mdf;Integrated
Security=True;User Instance=True")

12.4.2 Code for System Date

Dim dt As New DateTime


dt = Today
ComboBox3.Text = (dt.Day)
ComboBox4.Text = (dt.Month)
ComboBox4.Text = GetMonthName(Val(ComboBox4.Text))
ComboBox5.Text = (dt.Year)
Dim s As String
s = ComboBox4.Text
s = s.ToUpper
ComboBox4.Text = s

Private Function GetMonthName(ByVal monthNum As Integer) As String


Dim strDate As New DateTime(1, monthNum, 1)
Return strDate.ToString("MMMMMM")
End Function

12.4.3 Code for Calculation For Total hours Work

Me.TextBox6.Text = TimeDiff(DateTimePicker2.Value, DateTimePicker1.Value)


DateTimePicker2.Format = DateTimePickerFormat.Time
DateTimePicker1.Format = DateTimePickerFormat.Time
Private Function TimeDiff(ByVal Time2 As String, ByVal Time1 As String) As
String
Dim MinsDiff As String
Dim TheHours As String
MinsDiff = DateDiff("n", Time2, Time1)
TheHours = Format(Int(IIf(MinsDiff < 0, MinsDiff + 1440, MinsDiff) / 60), "00")
MinsDiff = Format(MinsDiff Mod 60, "00")
TimeDiff = TheHours
TextBox3.Text = MinsDiff
End Function

38
 
 

12.6.4 Code for Getting a List of All Present ID

Dim mycon As SqlClient.SqlConnection


Dim mycmd As SqlClient.SqlCommand
Dim myquery As String
mycon = New SqlClient.SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\USER\My
Documents\Visual Studio 2005\Projects\PAY\PAY\payrolldatabse.mdf;Integrated
Security=True;User Instance=True")
myquery = ("SELECT EMP_ID FROM DIALY_MUSTER WHERE DATE=(" +
ComboBox2.Text + ")AND MONTH like '%" + ComboBox3.Text + "%' AND YEAR=("
+ ComboBox4.Text + ")")
mycon.Open()
mycmd = New SqlClient.SqlCommand(myquery, mycon)
Dim dr As SqlClient.SqlDataReader
mycmd.ExecuteNonQuery()
dr = mycmd.ExecuteReader
While dr.Read
ListBox2.Items.Add(dr.GetInt32(0))
End While
If Not dr.HasRows Then
MessageBox.Show("ATTENDANCE NOT MAINTAIN FOR THIS DATE",
"ATTENDANCE(PAYROLL SYSTEM)", MessageBoxButtons.OK,
MessageBoxIcon.Asterisk)
Button6.Enabled = False
Button5.Enabled = False
Button8.Enabled = True
mycon.Close()
dr.Close()
Else : Button5.Enabled = False
Button6.Enabled = True
End If

12.6.5 Code for Getting a List of All Absent ID

Dim a As Int32
For Each a In (ListBox1.Items)
If ListBox2.Items.Contains(a) Then
Else : ListBox3.Items.Add(a)
End If
Next
Dim itemCount As Integer = ListBox3.Items.Count
If itemCount = 0 Then
MessageBox.Show("NO ONE EMPLOYEE IS ABSENT TODAY!", "PAYROLL
SYSTEM(ABSENTY)", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)

39
 
 

12.7 CODE FOR THE FORM SALARY DETAIL

12.7.1 Coding for Connection String Declaration

Dim con As New SqlClient.SqlConnection("Data


Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\USER\My
Documents\Visual Studio 2005\Projects\PAY\PAY\payrolldatabse.mdf;Integrated
Security=True;User Instance=True")

12.7.2 Code for Show Basic Info and all Salary Detail of Particular Employee

Dim cmd As New SqlClient.SqlCommand()


cmd.Connection = con
con.Open()
cmd.CommandText = "SELECT * FROM EMP_INFO WHERE EMP_ID=(" +
ComboBox1.Text + ");"
cmd.ExecuteNonQuery()
Dim da As SqlClient.SqlDataAdapter = New
SqlClient.SqlDataAdapter(cmd.CommandText, con)
Dim ds As DataSet = New DataSet
da.Fill(ds, "EMP_INFO")
Dim dt As DataTable = ds.Tables("EMP_INFO")
Dim row As DataRow
For Each row In dt.Rows
TextBox4.Text = row("DATE OF BIRTH")
TextBox5.Text = row("JOINING DATE")
TextBox6.Text = row("ADDRESS")
TextBox7.Text = row("CONTACT NUMBER")

Next row
If ds.Tables("EMP_INFO").Rows.Count = 0 Then
End If
con.Close()
Catch ex As Exception
End Try
Try
Dim cmd As New SqlClient.SqlCommand()
cmd.Connection = con
con.Open()
cmd.CommandText = "SELECT * FROM SAL_DETAIL WHERE EMP_ID=(" +
ComboBox1.Text + ");"
cmd.ExecuteNonQuery()
Dim da As SqlClient.SqlDataAdapter = New
SqlClient.SqlDataAdapter(cmd.CommandText, con)
Dim ds As DataSet = New DataSet
da.Fill(ds, "SAL_DETAIL")

Dim dt As DataTable = ds.Tables("SAL_DETAIL")

40
 
 

Dim row As DataRow


For Each row In dt.Rows
TextBox1.Text = row("FIRST NAME")
TextBox2.Text = row("LAST NAME")
TextBox3.Text = row("DESIGNATION")
TextBox8.Text = row("BASIC SAL")
TextBox9.Text = row("TRAVEL ALLOWANCE")
TextBox10.Text = row("HRA")
TextBox11.Text = row("SPECIAL ALLOWANCE")
TextBox12.Text = row("ESI")
TextBox13.Text = row("PF")
TextBox14.Text = row("PROFESSIONAL TAX")

Next row
If ds.Tables("SAL_DETAIL").Rows.Count = 0 Then
MessageBox.Show("Sorry No Record Found Please Try Again!", " PAYROLL
SYSTEM(NOT FOUND) ", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
con.Close()
Catch ex As Exception
End Try
End Sub

12.8CODE FOR THE FORM PAYROLL

12.8.1 Coding for Connection String Declaration

Dim con As New SqlClient.SqlConnection("Data


Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\USER\My
Documents\Visual Studio 2005\Projects\PAY\PAY\payrolldatabse.mdf;Integrated
Security=True;User Instance=True")

13.8.2 Coding for Show Particular Employee Information

Dim cmd As New SqlClient.SqlCommand()


cmd.Connection = con
con.Open()
cmd.CommandText = "SELECT * FROM SAL_DETAIL WHERE EMP_ID =(" +
ComboBox1.Text + ");"
cmd.ExecuteNonQuery()
Dim da As SqlClient.SqlDataAdapter = New
SqlClient.SqlDataAdapter(cmd.CommandText, con)
Dim ds As DataSet = New DataSet
da.Fill(ds, "SAL_DETAIL")
Dim dt As DataTable = ds.Tables("SAL_DETAIL")
Dim row As DataRow
For Each row In dt.Rows

41
 
 

TextBox1.Text = row("FIRST NAME")


TextBox2.Text = row("LAST NAME")
TextBox3.Text = row("DESIGNATION")
TextBox7.Text = row("BASIC SAL")
TextBox8.Text = row("TRAVEL ALLOWANCE")
TextBox9.Text = row("HRA")
TextBox10.Text = row("SPECIAL ALLOWANCE")
TextBox11.Text = row("ESI")
TextBox12.Text = row("PF")
TextBox13.Text = row("PROFESSIONAL TAX")
Next row
If ds.Tables("SAL_DETAIL").Rows.Count = 0 Then
MessageBox.Show("Sorry No Record Found Please Try Again!", " PAYROLL
SYSTEM ", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
con.Close()
Catch ex As SqlClient.SqlException
MessageBox.Show("select month and year" + ex.Message)
End Try

12.8.3 Coding for Count Absent Days of Employee

Dim cmd As New SqlClient.SqlCommand()


cmd.Connection = con
con.Open()
cmd.CommandText = "SELECT COUNT(PRESENT) FROM DIALY_MUSTER
WHERE EMP_ID=(" + ComboBox1.Text + ")AND YEAR=(" + ComboBox3.Text +
")AND MONTH like '%" + ComboBox2.Text + "%'AND PRESENT like '%" +
Label9.Text + "%'"
Dim s1 As IDataReader
s1 = cmd.ExecuteReader()
Dim da As SqlClient.SqlDataAdapter = New
SqlClient.SqlDataAdapter(cmd.CommandText, con)
Dim ds As DataSet = New DataSet
'da.Fill(ds, "DAILY_MUSTER")
Dim dt As DataTable = ds.Tables("DIALY_MUSTER")
' Dim row As DataRow
While s1.Read
TextBox14.Text = s1.Item(0).ToString
End While
' Close connection
con.Close()

12.8.4 Coding for Count Present Days of Employee

Dim cmd As New SqlClient.SqlCommand()


cmd.Connection = con

42
 
 

con.Open()
cmd.CommandText = "SELECT COUNT(PRESENT) FROM DIALY_MUSTER
WHERE EMP_ID=(" + ComboBox1.Text + ")AND YEAR=(" + ComboBox3.Text +
")AND MONTH like '%" + ComboBox2.Text + "%'AND PRESENT like '%" +
Label31.Text + "%'"
Dim s1 As IDataReader
s1 = cmd.ExecuteReader()
Dim da As SqlClient.SqlDataAdapter = New
SqlClient.SqlDataAdapter(cmd.CommandText, con)
Dim ds As DataSet = New DataSet

Dim dt As DataTable = ds.Tables("DIALY_MUSTER")

While s1.Read
TextBox6.Text = s1.Item(0).ToString
End While
' Close connection
con.Close()

12.8.5 Coding for Counting Leaves Taken by Employee

Dim cmd As New SqlClient.SqlCommand()


cmd.Connection = con
con.Open()
cmd.CommandText = "SELECT COUNT(PRESENT) FROM DIALY_MUSTER
WHERE EMP_ID=(" + ComboBox1.Text + ")AND YEAR=(" + ComboBox3.Text +
")AND MONTH like '%" + ComboBox2.Text + "%'AND PRESENT like '%" +
Label33.Text + "%'"
Dim s1 As IDataReader
s1 = cmd.ExecuteReader()
Dim da As SqlClient.SqlDataAdapter = New
SqlClient.SqlDataAdapter(cmd.CommandText, con)
Dim ds As DataSet = New DataSet
Dim dt As DataTable = ds.Tables("DIALY_MUSTER")
While s1.Read
TextBox5.Text = s1.Item(0).ToString
End While
' Close connection
con.Close()

12.8.5 Coding for Sum All Days Hours Work

Dim cmd As New SqlClient.SqlCommand()


cmd.Connection = con
con.Open()

43
 
 

cmd.CommandText = "SELECT SUM([HOURS WORK IN DAY]) FROM


DIALY_MUSTER WHERE EMP_ID=(" + ComboBox1.Text + ")AND YEAR=(" +
ComboBox3.Text + ")AND MONTH like '%" + ComboBox2.Text + "%'"
Dim s1 As IDataReader
s1 = cmd.ExecuteReader()
Dim da As SqlClient.SqlDataAdapter = New
SqlClient.SqlDataAdapter(cmd.CommandText, con)
Dim ds As DataSet = New DataSet

Dim dt As DataTable = ds.Tables("DIALY_MUSTER")

While s1.Read
TextBox4.Text = s1.Item(0).ToString
End While
con.Close()

12.8.6 Coding for Calculate Net Salary

TextBox15.Text = Val(TextBox14.Text) * 70
Amount.Text = Val(TextBox7.Text) + Val(TextBox8.Text) + Val(TextBox9.Text) +
Val(TextBox10.Text) - Val(TextBox11.Text) - Val(TextBox12.Text) -
Val(TextBox13.Text) - Val(TextBox15.Text)
If TextBox6.Text = "0" Then
Amount.Text = "0"
End If
txtRsToWords.Text = RupeesToWord(Val(Amount.Text))

12.8.7 Coding for Save Data

Dim mycon As SqlClient.SqlConnection


Dim mycmd As SqlClient.SqlCommand
Dim myquery As String
mycon = New SqlClient.SqlConnection("Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\USER\My
Documents\Visual Studio 2005\Projects\PAY\PAY\payrolldatabse.mdf;Integrated
Security=True;User Instance=True")
myquery = ("SELECT * FROM PAYROLL WHERE EMP_ID=(" +
ComboBox1.Text + ")AND [FIRST NAME]like'%" + TextBox1.Text + "%'AND [LAST
NAME]like '%" + TextBox2.Text + "%' AND MONTH like'%" + ComboBox2.Text +
"%'AND YEAR=(" + ComboBox3.Text + ")")
mycon.Open()
mycmd = New SqlClient.SqlCommand(myquery, mycon)
Dim dr As SqlClient.SqlDataReader
mycmd.ExecuteNonQuery()
dr = mycmd.ExecuteReader
Dim cmd As New SqlClient.SqlCommand()
cmd.Connection = con

44
 
 

con.Open()
If Not dr.HasRows Then
cmd.CommandText = "insert into PAYROLL VALUES ('" & ComboBox2.Text &
"','" & ComboBox3.Text & "','" & ComboBox1.Text & "' ,'" & TextBox1.Text & "' ,'" &
TextBox2.Text & "','" & TextBox3.Text & "' ,'" & TextBox4.Text & "','" &
TextBox6.Text & "','" & TextBox14.Text & "' ,'" & TextBox5.Text & "','" &
TextBox7.Text & "' ,'" & TextBox8.Text & "','" & TextBox9.Text & "','" &
TextBox10.Text & "','" & TextBox11.Text & "','" & TextBox12.Text & "','" &
TextBox13.Text & "','" & TextBox15.Text & "','" & Amount.Text & "','" &
txtRsToWords.Text & "','" & ComboBox4.Text & "')
cmd.ExecuteNonQuery()
MessageBox.Show("Record is successfully stored in PAYROLL", "PAYROLL
MANAGEMENT SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)

Else
If MessageBox.Show("THE PAYROLL FOR THIS EMPLOYEE ALREADY
CALCULATED FOR THIS MONTH!" & ControlChars.CrLf & "DO YOU WANT TO
CALCULATE PAYROLL FOR ANOTHER EMPLOYEE?", "ALREADY PRESENT",
MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) =
Windows.Forms.DialogResult.No Then
con.Close()
Me.Close()

12.8.8 Coding for Print Preview and Print

PrintForm2.Print()
PrintForm1.Print()

12.9 CODE FOR THE ALL REPORT

12.9.1 Code for Employee Information Report

Dim myConnection As New SqlClient.SqlConnection()


myConnection.ConnectionString = "Data
Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\USER\My
Documents\Visual Studio 2005\Projects\PAY\PAY\payrolldatabse.mdf;Integrated
Security=True;User Instance=True"
Dim MyCommand As New SqlClient.SqlCommand()
MyCommand.Connection = myConnection
MyCommand.CommandText = "Select * from EMP_INFO"
MyCommand.CommandType = CommandType.Text
Dim MyDA As New SqlClient.SqlDataAdapter()
MyDA.SelectCommand = MyCommand
MyCommand.CommandType = CommandType.Text
Dim myDS As New DataSet()
MyDA.Fill(myDS, "EMP_INFO")
Dim oRpt As New CrystalReport3()

45
 
 

oRpt.SetDataSource(myDS)
CrystalReportViewer1.ReportSource = oRpt

46
 
 

FUTURE DIRECTION

47
 
 

Chapter 13

FUTURE DIRECTION

We have been working on the project for the past three months and concluded that the

proposed system will be able to satisfy all the needs of a “Payroll Management System”.

It is designed in a way that it can handle all the tasks of a Company easily and efficiently.

The system can handle the reporting tasks very easily.

Future Enhancement:

 Use new more short coding method in .NET 2010 language for this software.

 Modification in Database. Data base modification can be easily handled by


introducing new techniques.

 More User friendly. To make it easy to understand and handle. It can be make more
user friendly by removing its complications.

 More Robust. Add new features in the software to make it more robust.

48
 
 

CONCLUSION

49
 
 

Chapter 14

CONCLUSION

The software has also made the report generation process very easy, as we do not have to
go through different files to enter the data in the report Performa’s. The software
automatically does these processes just by the single click of mouse.

The software is designed using SQL as backend tool, which is higher version of oracle
than the other lower versions of oracle such as oracle 8i. So if we will try to operate our
software on the lower version of oracle, it would generate errors.

Although I have put my full efforts to develop this project but still some things may have
been left which can be upgraded later on.

50
 

You might also like