
Public Sub adddata()
con.Open()
Dim dt As New DataTable("Table1")
Dim rs As New OleDb.OleDbCommand("INSERT INTO Table1(EmpIDno,FirstName,MiddleName,LastName,Birthdate, Age, Gender, Street_Brgy, City, Province, PostalCode,Job_Position, Salary, Deductions, Bonus, GrossSalary, Netpay) values ('" & txtempidno.Text & _
"','" & txtfirstname.Text & _
"','" & txtmiddlename.Text & _
"','" & txtlastname.Text & _
"','" & DateTimePicker1.Value.ToShortDateString.ToString & _
"','" & txtage.Text & _
"','" & cmbgender.Text & _
"','" & txtstreetbaranggay.Text & _
"','" & txtcity.Text &
"','" & txtprovince.Text & _
"','" & txtpostalcode.Text & _
"','" & txtjobposition.Text & _
"','" & txtsalary.Text & _
"','" & txtdeductions.Text & _
"','" & txtbonus.Text & _
"','" & txtgrosssalary.Text & _
"','" & txtnetpay.Text & "')", con)
rs.ExecuteNonQuery()
con.Close()
displaydata()
End Sub
Walang komento:
Mag-post ng isang Komento