Sistem informasi penggajian karyawan

Standar

BELAJAR BAHASA PEMROGRAMAN

FORM MENU UTAMA

Image

relasi

 

 

LISTING  PROGRAM

Public Class Form1

Private Sub JABATANToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JABATANToolStripMenuItem.Click

JABATAN.Show()

JABATAN.MdiParent = Me

End Sub

Private Sub PELAMARoolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PELAMARToolStripMenuItem.Click

PELAMAR.Show()

PELAMAR.MdiParent = Me

End Sub

Private Sub KARYAWANToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KARYAWANToolStripMenuItem.Click

KARYAWAN.Show()

KARYAWAN.MdiParent = Me

End Sub

Private Sub SELEKSI_NILAIToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SELEKSINILAIToolStripMenuItem.Click

SELEKSI_NILAI.Show()

SELEKSI_NILAI.MdiParent = Me

End Sub

Private Sub KELUARToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KELUARPROGRAMToolStripMenuItem.Click

Me.Close()

End Sub

Private Sub LjabatanToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LjabatanToolStripMenuItem.Click

Form2.Show()

Dim laporan As New CrystalReport2

Form2.CrystalReportViewer1.ReportSource = laporan

End Sub

Private Sub LpelamarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LpelamarToolStripMenuItem.Click

Form3.Show()

Dim laporan As New CrystalReport1

Form3.CrystalReportViewer1.ReportSource = laporan

End Sub

Private Sub LToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LToolStripMenuItem.Click

Form4.Show()

Dim laporan As New CrystalReport3

Form4.CrystalReportViewer1.ReportSource = laporan

End Sub

Private Sub LkaryawanToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LkaryawanToolStripMenuItem.Click

Form5.Show()

Dim laporan As New CrystalReport4

Form5.CrystalReportViewer1.ReportSource = laporan

End Sub

Private Sub LaprelasiToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LaprelasiToolStripMenuItem.Click

Form6.Show()

Dim laporan As New CrystalReport5

Form6.CrystalReportViewer1.ReportSource = laporan

End Sub

End Class

FORM  MENU  JABATAN

LISTING  PROGRAM

Public Class Form1

Private Sub JABATANToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JABATANToolStripMenuItem.Click

JABATAN.Show()

JABATAN.MdiParent = Me

End Sub

Private Sub PELAMARoolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PELAMARToolStripMenuItem.Click

PELAMAR.Show()

PELAMAR.MdiParent = Me

End Sub

Private Sub KARYAWANToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KARYAWANToolStripMenuItem.Click

KARYAWAN.Show()

KARYAWAN.MdiParent = Me

End Sub

Private Sub SELEKSI_NILAIToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SELEKSINILAIToolStripMenuItem.Click

SELEKSI_NILAI.Show()

SELEKSI_NILAI.MdiParent = Me

End Sub

Private Sub KELUARToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KELUARPROGRAMToolStripMenuItem.Click

Me.Close()

End Sub

Private Sub LjabatanToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LjabatanToolStripMenuItem.Click

Form2.Show()

Dim laporan As New CrystalReport2

Form2.CrystalReportViewer1.ReportSource = laporan

End Sub

Private Sub LpelamarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LpelamarToolStripMenuItem.Click

Form3.Show()

Dim laporan As New CrystalReport1

Form3.CrystalReportViewer1.ReportSource = laporan

End Sub

Private Sub LToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LToolStripMenuItem.Click

Form4.Show()

Dim laporan As New CrystalReport3

Form4.CrystalReportViewer1.ReportSource = laporan

End Sub

Private Sub LkaryawanToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LkaryawanToolStripMenuItem.Click

Form5.Show()

Dim laporan As New CrystalReport4

Form5.CrystalReportViewer1.ReportSource = laporan

End Sub

Private Sub LaprelasiToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LaprelasiToolStripMenuItem.Click

Form6.Show()

Dim laporan As New CrystalReport5

Form6.CrystalReportViewer1.ReportSource = laporan

End Sub

End Class

FORM  MENU  JABATAN

Image

Image

LISTING PROGRAM

Imports System.Data.OleDb

Public Class JABATAN

Public DB As OleDbConnection

Public CMD As OleDbCommand

Public ADP As OleDbDataAdapter

Public DR As OleDbDataReader

Public DS As New DataSet

Dim SQL As String

Sub tampilRecordJABATAN()

ADP = New OleDbDataAdapter(“SELECT * FROM JABATAN”, DB)

DS = New DataSet

ADP.Fill(DS, “JABATAN”)

DataGridView1.DataSource = DS.Tables(“JABATAN”)

End Sub

Sub butoonbaru()

btnbaru.Enabled = True

btnsimpan.Enabled = False

btnedit.Enabled = False

btnhapus.Enabled = False

btnbatal.Enabled = False

btnkeluar.Enabled = True

End Sub

Sub butoonedit()

btnbaru.Enabled = False

btnsimpan.Enabled = False

btnedit.Enabled = True

btnhapus.Enabled = True

btnbatal.Enabled = True

btnkeluar.Enabled = False

End Sub

Sub butoonsimpan()

btnbaru.Enabled = False

btnsimpan.Enabled = True

btnedit.Enabled = False

btnhapus.Enabled = False

btnbatal.Enabled = True

btnkeluar.Enabled = False

End Sub

Sub hapustext()

kode.Text = “”

bagian.Text = “”

nama_jabatan.Text = “”

Call butoonbaru()

End Sub

Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click

SQL = “DELETE FROM JABATAN Where kode='” & kode.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilRecordJABATAN()

End Sub

Public Sub OPENDB()

Dim LOKASI = “Provider = Microsoft.Jet.OLEDB.4.0;Data Source=C:\db2\santy.mdb”

DB = New OleDbConnection(LOKASI)

If DB.State = ConnectionState.Closed Then

DB.Open()

End If

End Sub

Private Sub JABATAN_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Call OPENDB()

Call tampilRecordJABATAN()

End Sub

Private Sub kode_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles kode.KeyPress

Dim tombol As Integer = Asc(e.KeyChar)

Dim xkode As String

Dim xkd As String = “”

Dim xbagian As String = “”

If tombol = 13 Then

SQL = “SELECT * FROM JABATAN Where kode='” & kode.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

DR = CMD.ExecuteReader

DR.Read()

If DR.HasRows = True Then

kode.Text = DR.Item(1)

nama_jabatan.Text = DR.Item(2)

‘bagian.Text = DR.Item(3)

Call butoonedit()

MsgBox(“DATA DITEMUKAN!”)

Else

xkode = kode.Text

Call hapustext()

kode.Text = xkode

Call butoonsimpan()

End If

nama_jabatan.Focus()

End If

End Sub

Private Sub btnedit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnedit.Click

SQL = “UPDATE JABATAN SET kode='” & kode.Text & “‘ ” & _

“nama_jabatan='” & nama_jabatan.Text & “‘ ” & _

“bagian='” & bagian.Text & “‘ ” & _

“Where kode ='” & kode.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilRecordJABATAN()

End Sub

Private Sub btnbaru_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbaru.Click

Call hapustext()

kode.Focus()

End Sub

Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click

SQL = “INSERT INTO JABATAN (kode,nama_jabatan,bagian)” & _

“Values (‘” & kode.Text & “‘,'” & _

nama_jabatan.Text & “‘,'” & _

bagian.Text & “‘)”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilRecordJABATAN()

End Sub

Private Sub btnbatal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbatal.Click

Call hapustext()

kode.Focus()

End Sub

Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click

Me.Close()

End Sub

End Class

FORM  MENU  PELAMAR

Image

Image

LISTING PROGRAM

Imports System.Data.OleDb

Public Class PELAMAR

Public DB As OleDbConnection

Public CMD As OleDbCommand

Public ADP As OleDbDataAdapter

Public DR As OleDbDataReader

Public DS As New DataSet

Dim SQL As String

Sub tampilPELAMAR()

ADP = New OleDbDataAdapter(“SELECT * FROM PELAMAR”, DB)

DS = New DataSet

ADP.Fill(DS, “PELAMAR”)

DataGridView1.DataSource = DS.Tables(“PELAMAR”)

End Sub

Sub butoonbaru()

btnbaru.Enabled = True

btnsimpan.Enabled = False

btnedit.Enabled = False

btnhapus.Enabled = False

btnbatal.Enabled = False

btnkeluar.Enabled = True

End Sub

Sub butoonedit()

btnbaru.Enabled = False

btnsimpan.Enabled = False

btnedit.Enabled = True

btnhapus.Enabled = True

btnbatal.Enabled = True

btnkeluar.Enabled = False

End Sub

Sub butoonsimpan()

btnbaru.Enabled = False

btnsimpan.Enabled = True

btnedit.Enabled = False

btnhapus.Enabled = False

btnbatal.Enabled = True

btnkeluar.Enabled = False

End Sub

Sub hapustext()

kodepelamar.Text = “”

nama.Text = “”

Call butoonbaru()

End Sub

Public Sub OPENDB()

Dim LOKASI = “Provider = Microsoft.Jet.OLEDB.4.0;Data Source=C:\db2\santy.mdb”

DB = New OleDbConnection(LOKASI)

If DB.State = ConnectionState.Closed Then

DB.Open()

End If

End Sub

Private Sub pelamar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Call OPENDB()

Call tampilPELAMAR()

End Sub

Private Sub kodepelamar_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles kodepelamar.KeyPress

Dim tombol As Integer = Asc(e.KeyChar)

Dim xkode As String

Dim xkd As String = “”

Dim xbagian As String = “”

If tombol = 13 Then

SQL = “SELECT * FROM PELAMAR Where kode_pelamar='” & kodepelamar.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

DR = CMD.ExecuteReader

DR.Read()

If DR.HasRows = True Then

kodepelamar.Text = DR.Item(1)

nama.Text = DR.Item(2)

alamat.Text = DR.Item(3)

‘pendidikan.Text=DR.Item(4)

Call butoonedit()

MsgBox(“DATA DITEMUKAN!”)

Else

xkode = kodepelamar.Text

Call hapustext()

kodepelamar.Text = xkode

Call butoonsimpan()

End If

nama.Focus()

End If

End Sub

Private Sub btnedit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnedit.Click

SQL = “UPDATE PELAMAR SET kode_pelamar='” & kodepelamar.Text & “‘ ” & _

“nama='” & nama.Text & “‘ ” & _

“alamat='” & alamat.Text & “‘ ” & _

“pendidikan='” & pendidikan.Text & “‘ ” & _

“Where kode_pelamar ='” & kodepelamar.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilPELAMAR()

End Sub

Private Sub btnbatal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbatal.Click

Call hapustext()

kodepelamar.Focus()

End Sub

Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click

SQL = “INSERT INTO PELAMAR(kode_pelamar,nama,alamat,pendidikan)” & _

“Values (‘” & kodepelamar.Text & “‘,'” & _

nama.Text & “‘,'” & _

alamat.Text & “‘,'” & _

pendidikan.Text & “‘)”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilPELAMAR()

End Sub

Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click

SQL = “DELETE FROM PELAMAR Where kode_pelamar='” & kodepelamar.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilPELAMAR()

End Sub

Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click

Me.Close()

End Sub

Private Sub btnbaru_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbaru.Click

Call hapustext()

kodepelamar.Focus()

End Sub

End Class

FORM  MENU  SELEKSI_NILAI

Image

Image

LISTING  PROGRAM

Imports System.Data.OleDb

Public Class SELEKSI_NILAI

Public DB As OleDbConnection

Public CMD As OleDbCommand

Public ADP As OleDbDataAdapter

Public DR As OleDbDataReader

Public DS As New DataSet

Dim SQL As String

Sub tampilSELEKSI_NILAI()

ADP = New OleDbDataAdapter(“SELECT * FROM SELEKSI_NILAI”, DB)

DS = New DataSet

ADP.Fill(DS, “SELEKSI_NILAI”)

DataGridView1.DataSource = DS.Tables(“SELEKSI_NILAI”)

End Sub

Sub butoonbaru()

btnbaru.Enabled = True

btnsimpan.Enabled = False

btnedit.Enabled = False

btnhapus.Enabled = False

btnbatal.Enabled = False

btnkeluar.Enabled = True

End Sub

Sub butoonedit()

btnbaru.Enabled = False

btnsimpan.Enabled = False

btnedit.Enabled = True

btnhapus.Enabled = True

btnbatal.Enabled = True

btnkeluar.Enabled = False

End Sub

Sub butoonsimpan()

btnbaru.Enabled = False

btnsimpan.Enabled = True

btnedit.Enabled = False

btnhapus.Enabled = False

btnbatal.Enabled = True

btnkeluar.Enabled = False

End Sub

Sub hapustext()

no_seleksi.Text = “”

kode_posisi.Text = “”

tanggal.Text = “”

Call butoonbaru()

End Sub

Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click

SQL = “DELETE FROM SELEKSI_NILAI Where No_seleksi='” & no_seleksi.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilSELEKSI_NILAI()

End Sub

Public Sub openDB()

Dim LOKASI = “Provider = Microsoft.Jet.OLEDB.4.0;Data Source=C:\db2\santy.mdb”

DB = New OleDbConnection(LOKASI)

If DB.State = ConnectionState.Closed Then

DB.Open()

End If

End Sub

Private Sub SELEKSI_NILAI_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Call openDB()

Call hapustext()

Call tampilSELEKSI_NILAI()

End Sub

Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click

SQL = “INSERT INTO SELEKSI_NILAI (No_seleksi,kode_posisi,tanggal)” & _

“Values (‘” & no_seleksi.Text & “‘,'” & _

kode_posisi.Text & “‘,'” & _

tanggal.Text & “‘)”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilSELEKSI_NILAI()

End Sub

Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click

Me.Close()

End Sub

Private Sub btnbaru_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbaru.Click

Call hapustext()

no_seleksi.Focus()

End Sub

Private Sub btnedit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnedit.Click

SQL = “UPDATE SELEKSI_NILAI SET No seleksi='” & no_seleksi.Text & “‘,” & _

“kode posisi='” & kode_posisi.Text & “‘,” & _

“tanggal='” & tanggal.Text & “‘,” & _

“Where No_seleksi='” & no_seleksi.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilSELEKSI_NILAI()

End Sub

Private Sub no_seleksi_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles no_seleksi.KeyPress

Dim tombol As Integer = Asc(e.KeyChar)

Dim xkode As String

Dim xkd As String = “”

Dim xseleksi_nilai As String = “”

If tombol = 13 Then

SQL = “SELECT * FROM SELEKSI_NILAI Where No_seleksi='” & no_seleksi.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

DR = CMD.ExecuteReader

DR.Read()

If DR.HasRows = True Then

no_seleksi.Text = DR.Item(1)

kode_posisi.Text = DR.Item(2)

‘tanggal.Text = DR.Item(3)

Call butoonedit()

MsgBox(“DATA DITEMUKAN!”)

Else

xkode = no_seleksi.Text

Call hapustext()

no_seleksi.Text = xkode

Call butoonsimpan()

End If

kode_posisi.Focus()

End If

End Sub

Private Sub btnbatal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbatal.Click

Call hapustext()

no_seleksi.Focus()

End Sub

End Class

FROM MENU KARYAWAN

Image

Image

LISTING  PROGRAM

Imports System.Data.OleDb

Public Class KARYAWAN

Public DB As OleDbConnection

Public CMD As OleDbCommand

Public ADP As OleDbDataAdapter

Public DR As OleDbDataReader

Public DS As New DataSet

Dim SQL As String

Sub tampilKARYAWAN()

ADP = New OleDbDataAdapter(“SELECT * FROM KARYAWAN”, DB)

DS = New DataSet

ADP.Fill(DS, “KARYAWAN”)

DataGridView1.DataSource = DS.Tables(“KARYAWAN”)

End Sub

Sub butoonbaru()

btnbaru.Enabled = True

btnsimpan.Enabled = False

btnedit.Enabled = False

btnhapus.Enabled = False

btnbatal.Enabled = False

btnkeluar.Enabled = True

End Sub

Sub butoonedit()

btnbaru.Enabled = False

btnsimpan.Enabled = False

btnedit.Enabled = True

btnhapus.Enabled = True

btnbatal.Enabled = True

btnkeluar.Enabled = False

End Sub

Sub butoonsimpan()

btnbaru.Enabled = False

btnsimpan.Enabled = True

btnedit.Enabled = False

btnhapus.Enabled = False

btnbatal.Enabled = True

btnkeluar.Enabled = False

End Sub

Sub hapustext()

nik.Text = “”

posisi_jabatan.Text = “”

nama_jabatan.Text = “”

bagian.Text = “”

jenis_kelamin.Text = “”

Call butoonbaru()

End Sub

Public Sub OPENDB()

Dim LOKASI = “Provider = Microsoft.Jet.OLEDB.4.0;Data Source=C:\db2\santy.mdb”

DB = New OleDbConnection(LOKASI)

If DB.State = ConnectionState.Closed Then

DB.Open()

End If

End Sub

Private Sub KARYAWAN_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Call OPENDB()

Call tampilKARYAWAN()

End Sub

Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click

Me.Close()

End Sub

Private Sub NIK_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles nik.KeyPress

Dim tombol As Integer = Asc(e.KeyChar)

Dim xkode As String

Dim xkd As String = “”

Dim xbagian As String = “”

If tombol = 13 Then

SQL = “SELECT * FROM KARYAWAN Where NIK='” & nik.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

DR = CMD.ExecuteReader

DR.Read()

If DR.HasRows = True Then

nik.Text = DR.Item(1)

posisi_jabatan.Text = DR.Item(2)

nama_jabatan.Text = DR.Item(3)

bagian.Text = DR.Item(4)

jenis_kelamin.Text = DR.Item(5)

Call butoonedit()

MsgBox(“DATA DITEMUKAN!”)

Else

xkode = nik.Text

Call hapustext()

nik.Text = xkode

Call butoonsimpan()

End If

posisi_jabatan.Focus()

End If

End Sub

Private Sub btnbatal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbatal.Click

Call hapustext()

nik.Focus()

End Sub

Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click

SQL = “INSERT INTO KARYAWAN (NIK, POSISI_JABATAN, NAMA_JABATAN,BAGIAN, JENIS_KELAMIN)” & _

“Values (‘” & nik.Text & “‘,'” & _

posisi_jabatan.Text & “‘,'” & _

nama_jabatan.Text & “‘,'” & _

bagian.Text & “‘,'” & _

jenis_kelamin.Text & “‘)”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilKARYAWAN()

End Sub

Private Sub btnedit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnedit.Click

SQL = “UPDATE KARYAWAN SET nama_jabatan='” & nama_jabatan.Text & “‘,” & _

“posisi_jabatan='” & posisi_jabatan.Text & “‘,” & _

“jenis-kelamin='” & jenis_kelamin.Text & “‘,” & _

“bagian='” & bagian.Text & “‘ ” & _

“Where nik='” & nik.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilKARYAWAN()

Call hapustext()

End Sub

Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click

SQL = “DELETE FROM KARYAWAN Where nik='” & nik.Text & “‘”

CMD = New OleDbCommand(SQL, DB)

CMD.ExecuteNonQuery()

Call btnbaru_Click(sender, e)

Call tampilKARYAWAN()

End Sub

Private Sub btnbaru_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbaru.Click

Call hapustext()

nik.Focus()

End Sub

End Class

 

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s