Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
Imports System.Data.OleDb
Public Class Form1
'Membuat Variable koneksi ke database
Dim koneksi As New OleDbConnection
Sub bukadatabases()
koneksi = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbDatabase.mdb")
koneksi.Open()
If koneksi.State = ConnectionState.Open Then
MsgBox("Koneksi Database Berhasil")
End If
End Sub
Sub simpandatas()
Dim sql As String
Dim cmd As New OleDbCommand
sql = "Insert Into FormKerja Values('" & txtNama.Text & "','" & DateTimePicker1.Text & "','" & txtUmur.Text & "','" & CBJenisKelamin.Text & "','" & CBPendidikan.Text & "','" & txtIPK.Text & "','" & CBPosisi.Text & "','" & txtKet.Text & "')"
bukadatabases()
cmd = New OleDbCommand(sql, koneksi)
cmd.ExecuteNonQuery()
MsgBox("Data diSimpan Berhasil")
End Sub
Private Sub btnSimpans_Click(sender As Object, e As EventArgs) Handles btnSimpans.Click
' If txtNIM.Text.Trim = "" Then
'txtNIM.Focus()
'MsgBox("NIM Tidak Boleh Kosong!")
'Exit Sub
' If txtNama.Text.Trim = "" Then
'txtNama.Focus()
'MsgBox("Nama Tidak Boleh Kosong!")
'End If
'End If
Dim IPKDb As Double = txtIPK.Text
If CBJenisKelamin.Text <> "P" And CBJenisKelamin.Text <> "L" Then
MsgBox("Jenis Kelamin Tidak Valid atau Kosong") : Exit Sub
ElseIf CBPendidikan.Text <> "D1" And CBPendidikan.Text <> "D2" And CBPendidikan.Text <> "D3" And CBPendidikan.Text <> "S1" And CBPendidikan.Text <> "S2" And CBPendidikan.Text <> "S3" Then
MsgBox("Pendidikan Tidak Valid atau Kosong") : Exit Sub
ElseIf CBPosisi.Text <> "Administrasi" And CBPosisi.Text <> "Marketing" And CBPosisi.Text <> "EDP" Then
MsgBox("Posisi Tidak Valid atau Kosong") : Exit Sub
End If
'Keterangan
If CBPosisi.Text = "Marketing" And CBJenisKelamin.Text = "L" And txtUmur.Text >= 30 And IPKDb >= 3 And CBPendidikan.Text = "S1" Then
txtKet.Text = "Test Wawancara"
Else
txtKet.Text = ""
End If
If CBPosisi.Text = "Administrasi" And CBJenisKelamin.Text = "L" Or CBJenisKelamin.Text = "P" And txtUmur.Text <= 25 And IPKDb >= 2.5 And CBPendidikan.Text = "D3" Then
txtKet.Text = "Test Wawancara"
Else
txtKet.Text = ""
End If
If CBPosisi.Text = "EDP" And CBJenisKelamin.Text = "L" Or CBJenisKelamin.Text = "P" And txtUmur.Text >= 30 Or txtUmur.Text < 35 And IPKDb >= 3.5 And CBPendidikan.Text = "S1" Then
txtKet.Text = "Test Wawancara"
Else
txtKet.Text = ""
End If
simpandatas()
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
CBJenisKelamin.Items.Add("P")
CBJenisKelamin.Items.Add("L")
CBPendidikan.Items.Add("D1")
CBPendidikan.Items.Add("D2")
CBPendidikan.Items.Add("D3")
CBPendidikan.Items.Add("S1")
CBPendidikan.Items.Add("S2")
CBPendidikan.Items.Add("S3")
CBPosisi.Items.Add("Administrasi")
CBPosisi.Items.Add("Marketing")
CBPosisi.Items.Add("EDP")
End Sub
Private Sub btnKeluar_Click(sender As Object, e As EventArgs) Handles btnKeluar.Click
End
End Sub
Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker1.ValueChanged
Dim umur As New Integer
umur = 2004 - DateTimePicker1.Value.Year
'DateTime.Today.Year
txtUmur.Text = umur.ToString()
If DateTimePicker1.Value.Year > DateTime.Today.Year Then
MsgBox("Tahun Lahir tidak Valid!")
DateTimePicker1.Value = DateTime.Today
txtUmur.Text = ""
End If
End Sub
End Class
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team