Educated Filipino

Topics: Class, Access code, User Pages: 5 (564 words) Published: June 19, 2013
CODES IN
PAYROLL MANAGEMENT SYSTEM

Imports System.Data.OleDb
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a As String = TextBox1.Text
Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\acer\Desktop\login.mdb") Dim db As New OleDbCommand("Select * From login Where username='" & a & "'", con) con.Open()

Dim rdr As OleDbDataReader = db.ExecuteReader()
If rdr.HasRows Then
MsgBox("Welcome " + a, vbInformation, "Notification") Me.Hide()
Form2.Show()
ElseIf TextBox1.Text = "" Then

MsgBox("Please Input Password", vbCritical, "Notification") Else
MsgBox("Invalid Password", vbCritical, "Notification") TextBox1.Text = ""

End If
con.Close()

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If MsgBox("Are you sure do you want to LogOut?", vbYesNo, "Notification") = vbYes Then

End

End If

End Sub
End Class

Imports System.Data.OleDb
Public Class Form2
Dim con As New OleDbConnection
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con.ConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\acer\Desktop\payrolll.mdb")

End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged con.Open()
Dim dt As New DataTable
Dim ds As New DataSet
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter

da = New OleDbDataAdapter("select * from payroll where ID like '%" & TextBox1.Text & "%'", con) da.Fill(dt)
DataGridView1.DataSource = dt.DefaultView
con.Close()

End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged

End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

Dim a, b, c, d As String

a = TextBox4.Text
b = TextBox5.Text

TextBox1.Text = Val(a + b + c)
End Sub

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 = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ot, rate, day, abs, sum, sum1 As Integer
ot = Val(TextBox6.Text)
rate = Val(TextBox7.Text)
day = Val(TextBox14.Text)
rate = 100
abs = Val(TextBox10.Text)
sum = Val(day * 800 - abs * 800 + ot * 100 + rate)
Dim under, ph As Integer

under = Val(TextBox9.Text)
abs = Val(TextBox10.Text)
ph = 450

sum1 = Val(under * 100 + abs * 800 + ph)
If TextBox14.Text = "" Then

MsgBox("INPUT NO. OF DAYS", vbCritical, "Notification") MsgBox("No Salary", vbCritical, "Notification")
Else

TextBox13.Text = Val(sum - sum1)

End If

If Val(TextBox1.Text) = "1" Then
TextBox7.Text = "450"
ElseIf Val(TextBox1.Text) = "2" Then
TextBox7.Text = "500"
ElseIf Val(TextBox1.Text) = "3" Then
TextBox7.Text = "900"
ElseIf...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Filipino Essay
  • The Filipino Essay
  • Essay on The Filipino Cultural Awareness
  • Essay on A Good Filipino Citizen
  • The Search for Filipino Philosophy Essay
  • Essay about Roots of the Filipino Character
  • SUMMARY OF Indolence of the Filipinos Essay
  • The Filipino Values Essay

Become a StudyMode Member

Sign Up - It's Free