GAD Project Final PDF
GAD Project Final PDF
GAD Project Final PDF
Micro-Project Report
On
“Payroll Management System”
Partial Fulfilment of the Requirement for the Diploma in Computer Engineering.
By
1) MEHETRE NEHA [1914660017]
Guided By
Prof. Varpe A.S.
CERTIFICATE
This is to certify that the project work entitled
“Payroll Management System”
is
Submitted by
1) MEHETRE NEHA [1914660017]
Main aim of developing Employee Payroll Management is to provide an easy way not only
to automate all functionalities involved managing leaves and Payroll for the employees of
Company, but also to provide full functional reports to management of Company with the details
about usage of leave facility and Salaries paid or to be paid to employees.
3.0 Action plan:
Name of
Sr. Planned Planned
Details of activity Responsible Team
No. start date Finish date
Member
1. Topic Search Potghan Pratiksha
Detailed Information
3. Shelar Sandip
Gathering for Project
Developing Project
4. Jadhav Shraddha
Diagrams
Taking overview of
5. All Members
Project
Sr. Name of
Specification Qty. Remarks
No. resources/Material
1. VB.NET Software 1 -
2. Microsoft Word 2013 1 -
3. Search Engine Google 1 -
***************
Micro-Project Report
“Payroll Management System”
The term payroll encompasses every employee who receives a regular wage or other
compensation. The different payment methods are calculated by a payroll specialist and the
appropriate pay checks are issued. After a payroll accountant multiplies an employee’s hours by
his/her pay rate, the gross income amount is entered into a computer program…..
Regular deductions such as tax withholdings, medical insurance etc. are then categorized and
subtracted. The remaining balance is then converted to a check and becomes the employee’s net
pay for that time period. Setting up an effective payroll system is not difficult for trained
professionals, but it can be very time consuming.
A payroll system involves everything that has to do with the payment of employees and the
filing of employment taxes, keeping track of hours, calculating salary, printing and delivering
checks etc.
Login:
Imports MySql.Data.MySqlClient
Public Class login
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Me.Close()
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.LinkLabelLinkClickedEventArgs)
'Main.Show()
Me.Hide()
End Sub
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnlogin.Click
'put the string value to sql
sql = "SELECT * from user WHERE username = '" & username.Text & "' and Pass = sha('"
& password.Text & "')"
'call your sub name and put the sql in the parameters list.
loginUser(sql)
End Sub
Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles GroupBox2.Enter
End Sub
Private Sub login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
End Sub
End Class
Form 1:
Imports MySql.Data.MySqlClient
Public Class Form1
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripButton1.Click
With frmPayroll
.Show()
.Focus()
End With
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripButton2.Click
With frmEmployee
.Show()
.Focus()
End With
End Sub
Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripButton3.Click
With frmUser
.Show()
.Focus()
End With
End Sub
Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripButton4.Click
With frmReport
.Show()
.Focus()
End With
End Sub
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As
System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
With login
.Show()
.Focus()
.username.Clear()
.password.Clear()
.username.Focus()
End With
End Sub
Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ToolStripButton5.Click
Me.Close()
End Sub
End Class
Frm Employee:
Imports MySql.Data.MySqlClient
Public Class frmEmployee
Private Sub frmEmployee_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
sql = "SELECT `emp_code` AS 'CODE',CONCAT( `emp_fname`,' ', `emp_lname`,' ',
`emp_mname`) AS 'NAME'" _
& ", `emp_age` AS 'AGE', `emp_sex` AS 'GENDER', `status` AS 'STATUS', `address` AS
'ADDRESS', `contact` AS 'CONTACT' FROM `employee`"
reload(sql, dtgemplist)
Call btnempnew_Click(sender, e)
End Sub
Dim rdo As String
Private Sub btnempsave_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnempsave.Click
Try
If txtcode.Text = "" Or txtfname.Text = "" Or txtlname.Text = "" Or txtmname.Text = "" _
Or txtaddress.Text = "" Or txtcontact.Text = "" Or txtstatus.Text = "" Or txtbplace.Text =
"" _
Or txtage.Text = "" Or txtemerg.Text = "" Or txtdrate.Text = "" Or txtposition.Text = ""
Then
MsgBox("One of the box is empty. It needed to be filled up.",
MsgBoxStyle.Exclamation)
Else
If rdomale.Checked = True Then
rdo = "MALE"
Else
rdo = "FEMALE"
End If
sql = "INSERT INTO `employee_workinfo` (`emp_code`, `d_rate`, `p_method`,
`position`, `w_status`, `d_hired`)" _
& " VALUES ('" & txtcode.Text & "','" & txtdrate.Text & "','" & txtpmethod.Text
& "','" & txtposition.Text _
& "','" & txtworkstatus.Text & "','" & dtpdhired.Text & "')"
createsub(sql)
sql = "INSERT INTO `employee` (`emp_code`, `emp_fname`, `emp_lname`,
`emp_mname`" _
& ", `address`, `contact`, `status`, `birth_date`, `birth_place`, `emp_sex`, `emp_age`" _
& ", `emerg_contct`) VALUES ('" & txtcode.Text & "','" & txtfname.Text & "','" &
txtlname.Text _
& "','" & txtmname.Text & "','" & txtaddress.Text & "','" & txtcontact.Text & "','" &
txtstatus.Text _
& "','" & dtpdbirth.Text & "','" & txtbplace.Text & "','" & rdo & "','" & txtage.Text &
"','" & txtcontact.Text & "')"
create(sql)
Call btnempnew_Click(sender, e)
End If
btnempsave.Enabled = True
btnempupdate.Enabled = False
Catch ex As Exception
'MsgBox(ex.Message & " btnempsave_Click", MsgBoxStyle.Exclamation)
End Try
End Sub
Private Sub TabControl2_Selected(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.TabControlEventArgs) Handles TabControl2.Selected
sql = "SELECT `emp_code` AS 'CODE',CONCAT( `emp_fname`,' ', `emp_lname`,' ',
`emp_mname`) AS 'NAME'" _
& ", `emp_age` AS 'AGE', `emp_sex` AS 'GENDER', `status` AS 'STATUS', `address` AS
'ADDRESS', `contact` AS 'CONTACT' FROM `employee`"
reload(sql, dtgemplist)
End Sub
Private Sub btnempupdate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnempupdate.Click
Try
If rdomale.Checked = True Then
rdo = "MALE"
Else
rdo = "FEMALE"
End If
sql = "UPDATE `employee_workinfo` SET `d_rate`='" & txtdrate.Text _
& "', `p_method`='" & txtpmethod.Text & "', `position`='" & txtposition.Text _
& "', `w_status`='" & txtworkstatus.Text & "', `d_hired`='" & dtpdhired.Text & "'
WHERE `emp_code`='" & txtcode.Text & "'"
createsub(sql)
sql = "UPDATE `employee` SET `emp_fname`='" & txtfname.Text _
& "', `emp_lname`='" & txtlname.Text & "', `emp_mname`='" & txtmname.Text _
& "', `address`='" & txtaddress.Text & "', `contact`='" & txtcontact.Text & "', `status`='" &
txtstatus.Text _
& "', `birth_date`='" & dtpdbirth.Text & "', `birth_place`='" & txtbplace.Text & "',
`emp_sex`='" & rdo _
& "', `emp_age`='" & txtage.Text & "', `emerg_contct`='" & txtcontact.Text _
& "' WHERE `emp_code`='" & txtcode.Text & "'"
updates(sql)
Call btnempnew_Click(sender, e)
btnempsave.Enabled = True
btnempupdate.Enabled = False
Catch ex As Exception
'MsgBox(ex.Message & " btnempsave_Click", MsgBoxStyle.Exclamation)
End Try
End Sub
Public empcode As String
Private Sub dtgemplist_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs)
Handles dtgemplist.DoubleClick
empcode = dtgemplist.CurrentRow.Cells(0).Value
TabControl2.SelectedTab = TabPage6
txtcode.Text = empcode
btnempsave.Enabled = False
btnempupdate.Enabled = True
End Sub
Private Sub txtcode_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtcode.TextChanged
sql = "SELECT * FROM `employee` e, `employee_workinfo` ew " _
& " WHERE e.`emp_code`=ew.`emp_code` AND e.emp_code ='" & txtcode.Text & "'"
filltxt(sql)
If dt.Rows.Count > 0 Then
txtdrate.Text = dt.Rows(0).Item("d_rate")
txtpmethod.Text = dt.Rows(0).Item("p_method")
txtposition.Text = dt.Rows(0).Item("position")
txtworkstatus.Text = dt.Rows(0).Item("w_status")
dtpdhired.Text = dt.Rows(0).Item("d_hired")
txtfname.Text = dt.Rows(0).Item("emp_fname")
txtlname.Text = dt.Rows(0).Item("emp_lname")
txtmname.Text = dt.Rows(0).Item("emp_mname")
txtaddress.Text = dt.Rows(0).Item("address")
txtcontact.Text = dt.Rows(0).Item("contact")
txtstatus.Text = dt.Rows(0).Item("status")
dtpdbirth.Text = dt.Rows(0).Item("birth_date")
txtbplace.Text = dt.Rows(0).Item("birth_place")
If dt.Rows(0).Item("emp_sex") = "MALE" Then
rdomale.Checked = True
Else
rdofemale.Checked = True
End If
txtage.Text = dt.Rows(0).Item("emp_age")
txtcontact.Text = dt.Rows(0).Item("emerg_contct")
Else
cleartxt(GroupBox10)
cleartxt(GroupBox9)
End If
End Sub
Private Sub btnempnew_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnempnew.Click
cleartxt(GroupBox10)
cleartxt(GroupBox9)
btnempsave.Enabled = True
btnempupdate.Enabled = False
txtcode.Clear()
End Sub
Private Sub txtempsearch_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtempsearch.TextChanged
sql = "SELECT `emp_code` AS 'CODE',CONCAT( `emp_fname`,' ', `emp_lname`,' ',
`emp_mname`) AS 'NAME'" _
& ", `emp_age` AS 'AGE', `emp_sex` AS 'GENDER', `status` AS 'STATUS', `address`
AS 'ADDRESS'" _
& ", `contact` AS 'CONTACT' FROM `employee` WHERE `emp_code` LIKE '%" &
txtempsearch.Text & "%'" _
& " OR emp_fname LIKE '%" & txtempsearch.Text & "%' OR emp_lname LIKE '%" &
txtempsearch.Text & "%'"
reload(sql, dtgemplist)
End Sub
Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btndelete.Click
sql = "DELETE FROM employee WHERE emp_code = '" &
dtgemplist.CurrentRow.Cells(0).Value & "'"
deletes(sql)
sql = "DELETE FROM employee_workinfo WHERE emp_code = '" &
dtgemplist.CurrentRow.Cells(0).Value & "'"
deletes(sql)
sql = "DELETE FROM other_deduction WHERE emp_code = '" &
dtgemplist.CurrentRow.Cells(0).Value & "'"
deletes(sql)
MsgBox("Employee has been deleted.", MsgBoxStyle.Information)
sql = "SELECT `emp_code` AS 'CODE',CONCAT( `emp_fname`,' ', `emp_lname`,' ',
`emp_mname`) AS 'NAME'" _
& ", `emp_age` AS 'AGE', `emp_sex` AS 'GENDER', `status` AS 'STATUS', `address` AS
'ADDRESS', `contact` AS 'CONTACT' FROM `employee`"
reload(sql, dtgemplist)
End Sub
End Class
Frm Payroll:
Imports MySql.Data.MySqlClient
Public Class frmPayroll
txtTotaldeduc.Text = ""
End If
End If
Next
End Sub
If dt.Rows.Count Then
txttrancode.Text = dt.Rows(0).Item(0)
End If
End Sub
Try
txtpnetincome.Text = Double.Parse(txtpnetincome.Text - txtTotaldeduc.Text)
Catch ex As Exception
End Try
End Sub
Try
Catch ex As Exception
End Try
End Sub
End Sub
txtpnetincome.Text = txtpgincome.Text
End Sub
Try
sql = "SELECT * FROM `employee` e, `employee_workinfo` ew " _
filltxt(sql)
txtPRateperday.Text = dt.Rows(0).Item("d_rate")
txtPPayPeriod.Text = dt.Rows(0).Item("p_method")
txtPEmployeeName.Text = dt.Rows(0).Item("emp_fname") _
& " " & dt.Rows(0).Item("emp_lname") & " " & dt.Rows(0).Item("emp_mname")
Else
cleartxt(GroupBox1)
cleartxt(GroupBox2)
cleartxt(GroupBox3)
cleartxt(GroupBox4)
cleartxt(GroupBox5)
cleartxt(GroupBox6)
cleartxt(GroupBox7)
End If
Catch ex As Exception
End Try
End Sub
Private Sub txtPholPayDay_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtPholPayDay.TextChanged
Try
Catch ex As Exception
End Try
End Sub
Try
Then
Else
& " VALUES ('" & txtPAssignCode.Text & "','" & txtpdeductname1.Text &
"','" _
& txtpdeduct1.Text & "','" & txtpdeductname2.Text & "','" & txtpdeduct2.Text
_
& "','" & txtpdeducttot.Text & "','" & txttrancode.Text & "')"
createsub(sql)
& " VALUES ('" & txtPAssignCode.Text & "','" & txtPNoDays.Text & "','" _
& txtPrateWage.Text & "','" & txtPregOt.Text & "','" & txtPholPay.Text _
& "','" & txtpgincome.Text & "','" & txtpcadvance.Text & "','" & txtbvale.Text _
& "','" & txtpphic.Text & "','" & txtppagibig.Text & "','" & txtpnetincome.Text _
& "','" & txtpremarks.Text & "',Now(),'" & txttrancode.Text & "')"
create(sql)
txtPAssignCode.Text = ""
End If
Catch ex As Exception
End Try
End Sub
"),e.emp_code as 'Assign Code', CONCAT( `emp_fname` , ' ', `emp_lname` , ' ',
`emp_mname` ) AS 'Employee'" & _
reload(sql, dtgParollList)
dtgParollList.Columns(0).Visible = False
End Sub
txtPAssignCode.Text = ""
End Sub
txtpnetincome.Text = txtpgincome.Text
clearing(GroupBox5)
clearing(GroupBox6)
txtpdeducttot.Text = Double.Parse(Val(txtpcadvance.Text) _
+ Val(txtbvale.Text) _
+ Val(txtpphic.Text) _
+ Val(txtppagibig.Text) _
+ Val(txtpdeduct1.Text) _
+ Val(txtpdeduct2.Text) _
+ Val(txtpdeduct3.Text) _
+ Val(txtpdeduct4.Text))
Catch ex As Exception
End Try
End Sub
txtpcadvance.Clear()
End If
End Sub
Private Sub txtbvale_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtbvale.TextChanged
txtbvale.Clear()
End If
End Sub
txtpphic.Clear()
End If
End Sub
txtppagibig.Clear()
End If
End Sub
txtpdeduct1.Clear()
End If
End Sub
txtpdeduct2.Clear()
End If
End Sub
txtpdeduct3.Clear()
End If
End Sub
txtpdeduct4.Clear()
End If
End Sub
"p.`trans_id`" & _
"),e.emp_code as 'Assign Code', CONCAT( `emp_fname` , ' ', `emp_lname` , ' ',
`emp_mname` ) AS 'Employee'" & _
reload(sql, dtgParollList)
dtgParollList.Columns(0).Visible = False
End Sub
Try
If Not IsNumeric(txtPNoDays.Text) Then
txtPNoDays.Clear()
End If
Catch ex As Exception
End Try
End Sub
Try
txtPRegOtHr.Clear()
End If
txtPregOt.Clear()
Else
total = Double.Parse(txtPRateperday.Text / 8)
End If
Catch ex As Exception
End Try
End Sub
Try
txtpgincome.Text = txtPrateWage.Text
Catch ex As Exception
End Try
End Sub
Try
Catch ex As Exception
End Try
End Sub
End Class
Frm Report:
Imports MySql.Data.MySqlClient
Public Class frmReport
Private Sub frmReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
End Sub
Private Sub weeklypayroll_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnweeklypayroll.Click
reports("SELECT CONCAT( `emp_lname` , ' , ', `emp_fname` ),`num_days` , `d_rate` ,
`r_wage` , `overtime` , `hol_pay` , `gross_sal` , `cash_ad` , `bread_vale` , `philhealth` ,
`deduct1` , `ded_amount1` , `deduct2` , `ded_amount2` , `deduct3` , `ded_amount3` , `total_ded`
, `net_income` ,`dateissued` " _
& "FROM `employee` e, `employee_workinfo` we, `payroll` p, `other_deduction` od "
& "WHERE e.`emp_code` = p.`emp_code` " _
& "AND p.`emp_code` = we.`emp_code` " _
& "AND p.`trans_id` = od.`trans_id` ", "weeklypayroll", CrystalReportViewer1)
End Sub
Private Sub btnPayslip_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnPayslip.Click
sql = "SELECT CONCAT( `emp_lname` , ' , ', `emp_fname` ) ,`num_days` , `d_rate` ,
`r_wage` " _
& ", `overtime` , `hol_pay` , `gross_sal` , `cash_ad` , `bread_vale` , `philhealth` , " _
& "`pag-ibig`, `deduct1` , `ded_amount1` , `deduct2` , `ded_amount2` , `deduct3` , " _
& "`ded_amount3` , `total_ded` , `net_income` ,`dateissued`" & _
" FROM `employee` e, `employee_workinfo` we, `payroll` p, `other_deduction` od " & _
" WHERE e.`emp_code` = p.`emp_code` " & _
" AND p.`emp_code` = we.`emp_code` " & _
" AND p.`trans_id` = od.`trans_id` "
reports(sql, "payslip", CrystalReportViewer1)
End Sub
End Class
Frm User:
Imports MySql.Data.MySqlClient
Public Class frmUser
Private Sub frmUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
reload("SELECT user_id as Id,name as Name,username as Username,type as Type FROM
user", dtg_userList)
lbl_id.Text = "id"
End Sub
Private Sub btnMUdel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnMUdel.Click
Try
If MessageBox.Show("Do you want to delete this record?", _
"DELETE", MessageBoxButtons.YesNo, _
MessageBoxIcon.Information) _
= Windows.Forms.DialogResult.Yes Then
sql = "DELETE FROM user WHERE user_id = '" &
dtg_userList.CurrentRow.Cells(0).Value & "'"
deletes(sql)
MsgBox("User has been deleted.", MsgBoxStyle.Information)
Call Button6_Click(sender, e)
Else
MsgBox("Operation has been cancel.", , "Cancel")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnsave.Click
If lbl_id.Text = "" Or _
txtname.Text = "" Or _
txtuser.Text = "" Or txtpass.Text = "" Then
MsgBox("One of the box is empty. Data is required.", MsgBoxStyle.Exclamation)
Else
If btnsave.Text = "Add" Then
'put the string value to sql
sql = "INSERT INTO `user` (`name`,`username`, `pass`, `type` ) VALUES ('" &
txtname.Text & "','" _
& txtuser.Text & "',sha('" & txtpass.Text & "'),'" & cbotype.Text & "')"
create(sql)
Else
sql = "UPDATE user set name='" & txtname.Text & "',username='" & txtuser.Text _
& "', pass = sha('" & txtpass.Text & "') Where user_id='" & lbl_id.Text & "'"
updates(sql)
End If
'call your sub name and put the sql in the parameters list.
Call Button6_Click(sender, e)
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btn_update.Click
'If lbl_id.Text = "Id" Then
'Else
' sql = "UPDATE user set name='" & txtname.Text & "',username='" & txtuser.Text _
' & "', pass = sha('" & txtpass.Text & "') Where user_id='" & lbl_id.Text & "'"
' updates(sql)
' userlist()
' Call Button6_Click(sender, e)
'End If
lbl_id.Text = dtg_userList.CurrentRow.Cells(0).Value
txtname.Text = dtg_userList.CurrentRow.Cells(1).Value
txtuser.Text = dtg_userList.CurrentRow.Cells(2).Value
btnsave.Text = "Save"
End Sub
Public Sub userlist()
reload("SELECT user_id as Id,name as Name,username as Username,type as Type FROM
user", dtg_userList)
lbl_id.Text = "id"
btnsave.Text = "Add"
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button6.Click
cleartxt(GroupBox11)
userlist()
End Sub
End Class
In the project of Payroll Management System, we learn about how to use the payroll
management system. In this we learn about the concept of how to create employee data. By this
project we learn how to work in a team, how to make co-ordination between a team. By this project
our team work skill is developed. Our project creation skill is developed. And learn how to face
the problems during the micro-project. Get some guide lines from the teachers about the project.
Teacher Evaluation Sheet
Name of Student:…………………………………………………………………………….
Enrollment No…………………………
Name of Programme………………………………………………………..
Semester:……………………………….
Code:…………………………………………………….
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
……………………………………………………………………………………………..
2 Literature survey/
Information Collection
3 Project Proposal
6 Quality of
Prototype/Model
7 Report Preparation
8 Presentation
9 Defence
Note:
Every course teacher is expected to assign marks for group evolution in first 3 columns &
individual evaluation in 4th columns for each group of students as per rubrics.
...……………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………
………………………………………………………………………………………………………
………………
Signature…………………………………………………………………..................