Employee Pay Roll


Page: 1 2 3 4 5 6 7 8 9


Use Case Diagram


Activity Diagram

Collabration Diagram



Sequence Diagram

Login Form


Source Code

Private Sub Label1_Click(Index As Integer)
Form2.Show
Unload Me
End Sub

Private Sub Label2_Click()
DataReport1.Show
End Sub

Private Sub Label3_Click()
End
End Sub



Pay Slip Form



Source Code

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim n As Integer


Private Sub AddNewButt_Click()

Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""

End Sub

Private Sub BackButt_Click()
Form1.Show
Unload Me
End Sub

Private Sub EditButt_Click()
a = InputBox("Enter the Employee ID")
rs.MoveFirst
Do While Not rs.EOF
If Val(a) = rs.Fields("id") Then
Text1.Text = rs.Fields("id")
Text2.Text = rs.Fields("name")
Text3.Text = rs.Fields("dept")
Text4.Text = rs.Fields("exp")
Text5.Text = rs.Fields("bpay")
Text6.Text = rs.Fields("hra")
Text7.Text = rs.Fields("pf")
Text8.Text = rs.Fields("cca")
Text9.Text = rs.Fields("gpay")
End If

rs.MoveNext
Loop
End Sub

Private Sub Form_Load()

cn.Open (" Provider=MSDASQL.1;Password=tiger;Persist Security Info=True;User ID=scott;Data Source=employee")
rs.Open "select * from emplak", cn, adOpenDynamic, adLockOptimistic


End Sub

Private Sub StoreButt_Click()

If cn.State = 1 Then cn.Close
cn.Open (" Provider=MSDASQL.1;Password=tiger;Persist Security Info=True;User ID=scott;Data Source=employee")


If Text1.Text <> "" And Text2.Text <> "" And Text3.Text <> "" And Text4.Text <> "" And Text5.Text <> "" And Text6.Text <> "" And Text7.Text <> "" And Text8.Text <> "" And Text8.Text <> "" And Text9.Text <> "" Then
cn.Execute ("insert into emplak values(" & Text1.Text & ",'" & Text2.Text & "','" & Text3.Text & "'," & Text4.Text & "," & Text5.Text & "," & Text6.Text & "," & Text7.Text & "," & Text8.Text & "," & Text9.Text & ")")

MsgBox ("UR Record has been Stored")
Else
MsgBox ("You have to Fill all the Fields")
End If
End Sub



Private Sub Text5_LostFocus()
Text6.Text = Val(Text5.Text) * 10 / 100
Text7.Text = Val(Text5.Text) * 12 / 100
Text8.Text = Val(Text5.Text) * 5 / 100
n = Val(Text5.Text) + Val(Text6.Text) + Val(Text8.Text)
Text9.Text = n - Val(Text7.Text)

End Sub

Private Sub UpdateButt_Click()

If cn.State = 1 Then cn.Close
cn.Open (" Provider=MSDASQL.1;Password=tiger;Persist Security Info=True;User ID=scott;Data Source=employee")
cn.Execute ("update emplak set name='" & Text2.Text & "',dept='" & Text3.Text & "',exp=" & Text4.Text & ",bpay=" & Text5.Text & ",hra=" & Text6.Text & ",pf=" & Text7.Text & ",cca=" & Text8.Text & ",gpay=" & Text9.Text & "where id=" & Text1.Text & "")
MsgBox "Updated"

End Sub

Output Screen PaySlip




Class Diagram

Pay Slip View