P. 1
Makalah Program App Akademik

Makalah Program App Akademik

|Views: 134|Likes:
Veröffentlicht vonYadi Suryadi

More info:

Published by: Yadi Suryadi on Feb 08, 2012
Urheberrecht:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

04/18/2012

pdf

text

original

Program Aplikasi Akademik

Makalah ini dibuat untuk memenuhi salah satu tugas Mata Kuliah Pemograman Visual II

Disusun Oleh: Yadi Suryadi 10260186 AMIK HASS Bandung 2011/2012

2012

Kata Pengantar
Segala pujidan syukur penulis panjatkan kehadirot Allah Subhanahu wa ta’ala, yang telah memberikan hidayah dan petunjuk kepada penulis dan atas kehendak-Nya pulalah penulis dapat menyelesaikan makalah ini untukmencoba ilmu-ilmu yang diperoleh selama mengikuti perkuliahan pemograman objek dengan Visual Studio 2005 dengan judul “Program Aplikasi Akademik”. Dalam Penulisan makalah ini penulis mendapatkan banyak bantuan dari berbagai pihak, baik moril maupun materiil , sehingga makalah ini dapat diseelsaikan oleh penulis. Untuk itu penulis mengucapkan terima kasih kepada: 1. Ibu Sri Kuswayati yang telah membimbing dan mengajar kami dengan penuh kesabaran. 2. Kakak-kakakku tersayang, Dedi Wahyudin dan Entin Kartini yang telah banyak memberikan dukungan moril dan materiil. 3. Orang tua tercinta yang telah memberikan dukungan dan Do’a, sehingga penulis dapat menyelesaikan Tugas makalah ini dengan baik. 4. Sahabat penulis yang selalu menyemangati dan selalu menemani disaat penulis membutuhkan dukungan.

Yadi Suryadi 10260186|AMIK HASS Bandung

Penulis menyadari bahwa didalam makalah ini masih terdapat kekurangan dan masih jauh dari kesempurnaan, untuk itu dengan segala kerendahan hati penulis mengharapkan berbagai saran dan kritik yang Bandung, Januari 2012

Penulis memebangun agar dapat di jadikan sesuatu yang menjadikan penulis mampu memperbaiki diri. Semoga Makalah ini bermanfaat bagi pembaca sekalian.

Yadi Suryadi 10260186|AMIK HASS Bandung

Daftar Isi
Kata Pengantar.............................................................................................................................2 BAB I PENDAHULUAN....................................................................................................................4 A. B. Latarbelakang...................................................................................................................4 Tujuan...............................................................................................................................4

BAB II PERANCANGAN PROGRAM..................................................................................................5 A. 1) 2) 3) B. 1) 2) C. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. D. 1. 2. 3. 4. 5. 6. 8. 9. 10. Konsep Sistem Informasi...................................................................................................5 Definisi Sistem Informasi...............................................................................................5 Visual Basic 2005..........................................................................................................5 SQL Server 2005............................................................................................................5 Rancangan Database........................................................................................................6 Struktur Tabel...............................................................................................................6 Relationship Diagram....................................................................................................8 Rancangan Interface.........................................................................................................9 Splash Screen................................................................................................................9 Menu Utama..................................................................................................................9 Logon Form.................................................................................................................10 Form Dosen.................................................................................................................10 Form Mahasiswa..........................................................................................................10 Form Mata Kuliah........................................................................................................11 Form Biaya..................................................................................................................11 Form Transaksi............................................................................................................12 Form KRS.....................................................................................................................12 Form User................................................................................................................13

Coding (Kode Program)...................................................................................................14 Coding Form Splash Screen.........................................................................................14 Coding Form Menu Utama...........................................................................................14 Coding Form Login.......................................................................................................18 Coding Form Dosen.....................................................................................................19 Coding Form Mahasiswa..............................................................................................22 Coding Form Mata kuliah.............................................................................................25 Coding Form Transaksi................................................................................................29 Coding Form KRS(Kartu Rencana Study)......................................................................34 Coding Form User....................................................................................................37

BAB III PENUTUP.........................................................................................................................40 A. Kesimpulan.....................................................................................................................40

Yadi Suryadi 10260186|AMIK HASS Bandung

B.

Saran...............................................................................................................................40

BAB I PENDAHULUAN
A. Latarbelakang
Pada era globalisasi seperti sekarang ini kebutuhan akan informasi menjadi semakin penting sehubungan dengan tujuan informasi yaitu menghasilkan sesuatu yang lebih berarti dan berguna demi mengambil keputusan secara cepat dan akurat. Kebutuhan akan penyajian informasi yang cepat dan akurat ini semakin dibutuhkan oleh berbagai pihak, baik kalangan pemerintah, swasta maupun perorangan. Berkaitan dengan itu diperlukan suatu media atau alat yang menyajikan informasi tersebut yaitu komputer. Dengan adanya komputerisasi, baik dalam dunia kerja maupun dunia bisnis efisiensi waktu dan efisiensi kerja sangat diutamakan agar dapat tercapai produktivitas kerja yang maksimal. Dalam aplikasi kerja pada saat ini komputerisasi sudah ada di setiap bidang pekerjaan apalagi yang berkaitan dengan data-data yang penting, baik yang sifatnya sementara maupun sifatnya tetap. Laporan data Akademik selama ini memang sudah terkomputerisasi menggunakan Word processor dan Spread sheet, akan tetapi masih tetap kurang efisien sehinga dapat dibangun suatu aplikasi khusus berupa perangkat lunak basisdata, agar lebih efisien dan efektif. Dengan latar belakang di atas maka penulis membuat makalah Tugas Akhir dengan judul “Program Aplikasi Akademik”.

B. Tujuan
Secara umum tujuan pembuatan makalah pemograman berorientasi objek dengan Visual Studio 2005 dengan judul ”Program Aplikasi Akademik Sederhana” ini ialah: Untuk mengetahui tentang bgaimana mengelola Sistem Informasi Akademik dengan baik dan mudah di mengerti dan dipahami oleh Orang yang membutuhka informasi tersebut.

Yadi Suryadi 10260186|AMIK HASS Bandung

BAB II

PERANCANGAN PROGRAM
A. Konsep Sistem Informasi
1) Definisi Sistem Informasi Sistem informasi dapat didefinisikan sebagai suatu kumpulan data yang sudah diolah, terintegrasi dan saling melengkapi yang menghasilkan informasi yang mempunyai nilai atau berguna dalam pengambilan keputusan. Sistem informasi akuntansi pada aplikasi ini merupakan sistem informasi yang memproses data transaksi bisnis sehingga menghasilkan keluaran berupa informasi keuangan yang berguna bagi pemakainya. 2) Visual Basic 2005 Visual Basic 2005 (VB 2005) merupakan bahasa pemrograman berbasis GUI (Graphical User Interface) atau program yang memungkinkan pengguna berkomunikasi dengan komputer menggunakan gambar atau grafik. Visual Basic 2005 adalah salah satu bahasa pemrograman yang dibuat oleh microsoft corporation dan VB 2005 merupakan pengembangan dari Visual Basic 6.0 (VB6). Visual Basic 2005 merupakan bagian dari sebuah suite aplikasi pemrograman Visual Studio 2005. Visual Basic 2005 menggunakan .NET Framework 2.0. 3) SQL Server 2005 SQL Sever 2005 merupakan salah satu jenis database server yang menggunakan SQL sebagai bahasa dasar untuk mengakses databasenya. SQl Server 2005 merupakan jenis RDBMS (Relational Database Management Sistem) yang diluncurkan oleh microsoft corporation bersamaan dengan Visual Studio 2005. SQl Server 2005 merupakan pengembangan dari SQL Server 2000. Bahasa yang digunakan oleh SQL Server 2005 adalah SQL (Structured Query Language). SQL adalah bahasa standar yang digunakan secara khusus untuk memanipulasi data, berkomunikasi dengan basisdata relasional.

Yadi Suryadi 10260186|AMIK HASS Bandung

B. Rancangan Database
Nama Database : DBAkademik.mdb Keterangan : * = Primary Key(PK)

1) Struktur Tabel Berikut adalah struktur tabel DBAkademik:
1. Tabel Dosen Field Name *NIDN Nama_Dosen Alamat Kelamin Pendidikan Kode_Mk Status Telepon Data Type Text Text Text Text Text Text Text Text Size 8 30 25 1 10 8 15 15 Descriptions Nomor Induk Dosen Nasional(PK) Nama_Dosen Alamat/Tempat tinggal Dosen Jenis Kelamin Dosen Tingkat Pendidikan Dosen Kode Mata Kuliah Dosen Status Pernikahan Dosen Nomor telepon Dosen

2. Tabel Mahasiswa Data Field Name Type *NIM Nama_MHS Kelamin Alamat Semester Kelas Jurusan Telepon Text Text Text Text Text Text Text Text

Size 8 30 1 25 5 5 15 15

Descriptions Nomor Induk Mahasiswa(PK) Nama Mahasiswa Jenis Kelamin Mahasiswa Alamat Mahasiswa Semester Kelas Jurusan Nomor Telepon Mahasiswa

3. Table Mata Kuliah Data Field Name Type *Kode_MK Nama_MK SKS NIDN Text Text Number Text

Size 8 25 Byte 8

Descriptions Kode Matakuliah(PK) Nama Matakuliah Jumlah SKS Matakuliah Nomor Induk Dosen Nasional

Yadi Suryadi 10260186|AMIK HASS Bandung

4. Tabel Biaya Field Name *Kode_Biaya Biaya_SPP Biaya_Semester Biaya_Perpus Data Type Text Number Number Number Long Integer Long Integer Long Integer Size 8 Descriptions Kode Biaya(PK) Biaya SPP Biaya Semester Biaya Perpustakaan

5. Tabel Transaksi Data Field Name Type *Kode_Transaksi NIM Kode_Biaya Pembayaran Selama Total 6. Tabel KRS Field Name *Kode_KRS NIM kode_MK Nilai_UTS Nilai_UAS Total_Nilai Grade Data Type Text Text Text Number Number Number Text Text Text Text Text Number Number

Size 8 8 8 10 Byte Long Integer

Descriptions Kode Transaksi(PK) Nomor Induk Mahasiswa Kode Biaya Nama Pembayaran Jumlah Bulan/ Semsester yang aka Di Bayar Total Pembayaran

Size 8 8 8 Decimal Decimal Decimal 1

Descriptions Kode KRS(PK) Nomor Induk Mahasiswa Kode Matakuliah Nilai UTS(10-100) Nilai UAS(10-100) Total Nilai(=(Nilai UTS+Nilai UAS)/2) Nilai Huruf

7. Tabel Login/User Data Field Name Type *Nama_User Password_User Text Text

Size 30 10

Descriptions Nama Pengguna Untuk Login(PK) Password

Yadi Suryadi 10260186|AMIK HASS Bandung

1) Relationship Diagram

Berikut ini adalah bentuk relationship diagram dari DBAkademik:

Yadi Suryadi 10260186|AMIK HASS Bandung

A. Rancangan Interface
Berikut ini adalah Rancangan interface dari “Program Aplikasi Akademik“: 1. Splash Screen

2. Menu Utama

Yadi Suryadi 10260186|AMIK HASS Bandung

3. Logon Form

4. Form Dosen

5. Form Mahasiswa

Yadi Suryadi 10260186|AMIK HASS Bandung

6. Form Mata Kuliah

7. Form Biaya

Yadi Suryadi 10260186|AMIK HASS Bandung

8. Form Transaksi

Yadi Suryadi 10260186|AMIK HASS Bandung

9. Form KRS

Yadi Suryadi 10260186|AMIK HASS Bandung

10.Form User

Yadi Suryadi 10260186|AMIK HASS Bandung

A. Coding (Kode Program)
Berikut ini merupakan coding dari setiap Form dalam “Program Aplikasi Akademik”: 1. Coding Form Splash Screen
Public NotInheritable Class SplashScreen1 'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab ' of the Project Designer ("Properties" under the "Project" menu).

Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Timer1.Start() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If ProgressBar1.Value < 100 Then ProgressBar1.Value += 5 ElseIf ProgressBar1.Value = 100 Then Timer1.Stop() Me.Hide() MenuUtama.Show() End If

End Sub End Class

2. Coding Form Menu Utama
Imports System.Windows.Forms Public Class MenuUtama Dim Bergerak As Integer Dim Teks As String Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) ' Create a new instance of the child form. Dim ChildForm As New System.Windows.Forms.Form ' Make it a child of this MDI form before showing it. ChildForm.MdiParent = Me m_ChildFormNumber += 1 ChildForm.Text = "Window " & m_ChildFormNumber

Yadi Suryadi 10260186|AMIK HASS Bandung

ChildForm.Show() End Sub Private Sub OpenFile(ByVal sender As Object, ByVal e As EventArgs) Dim OpenFileDialog As New OpenFileDialog OpenFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments OpenFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*" If (OpenFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then Dim FileName As String = OpenFileDialog.FileName ' TODO: Add code here to open the file. End If End Sub Private Sub SaveAsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Dim SaveFileDialog As New SaveFileDialog SaveFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments SaveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*" If (SaveFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then Dim FileName As String = SaveFileDialog.FileName ' TODO: Add code here to save the current contents of the form to a file. End If End Sub

Private Sub ExitToolsStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Global.System.Windows.Forms.Application.Exit() End Sub Private Sub CutToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) ' Use My.Computer.Clipboard to insert the selected text or images into the clipboard End Sub Private Sub CopyToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) ' Use My.Computer.Clipboard to insert the selected text or images into the clipboard End Sub Private Sub PasteToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)

Yadi Suryadi 10260186|AMIK HASS Bandung

'Use My.Computer.Clipboard.GetText() or My.Computer.Clipboard.GetData to retrieve information from the clipboard. End Sub Private Sub CascadeToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Me.LayoutMdi(MdiLayout.Cascade) End Sub Private Sub TileVerticleToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Me.LayoutMdi(MdiLayout.TileVertical) End Sub Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Me.LayoutMdi(MdiLayout.TileHorizontal) End Sub Private Sub ArrangeIconsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Me.LayoutMdi(MdiLayout.ArrangeIcons) End Sub Private Sub CloseAllToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) ' Close all child forms of the parent. For Each ChildForm As Form In Me.MdiChildren ChildForm.Close() Next End Sub Private m_ChildFormNumber As Integer = 0 Private Sub MDIParent1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Start() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Me.Text = Microsoft.VisualBasic.Right _ (Me.Teks, Len(Me.Teks) + 1) & Microsoft.VisualBasic.Left _ (Me.Teks, 0) End Sub Private Sub DataPenggunaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataPenggunaToolStripMenuItem.Click FRUser.Show() End Sub Private Sub DataDosenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

Yadi Suryadi 10260186|AMIK HASS Bandung

DataDosenToolStripMenuItem.Click FRDosen.Show() End Sub Private Sub DataMahasiswaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataMahasiswaToolStripMenuItem.Click FRMahasiswa.Show() End Sub Private Sub DataMataKuliahToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataMataKuliahToolStripMenuItem.Click FRMata_Kuliah.Show() End Sub Private Sub DataBiayaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataBiayaToolStripMenuItem.Click FRBiaya.Show() End Sub Private Sub TransaksiToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TransaksiToolStripMenuItem2.Click FRTransaksi.Show() End Sub Private Sub KRSToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KRSToolStripMenuItem1.Click FRKRS.Show() End Sub Private Sub KeluarToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem.Click If MessageBox.Show("Keluar Dari Aplikasi...?", "", MessageBoxButtons.OKCancel) = Windows.Forms.DialogResult.OK Then Close() End End If End Sub Private Sub LogInToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogInToolStripMenuItem.Click LoginForm1.Show() End Sub Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click If MessageBox.Show("Keluar Dari Aplikasi...?", "", MessageBoxButtons.OKCancel) = Windows.Forms.DialogResult.OK Then

Yadi Suryadi 10260186|AMIK HASS Bandung

Close() End End If End Sub Private Sub TransaksiToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TransaksiToolStripMenuItem1.Click FRReportTransaksi.Show() End Sub Private Sub KRSToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KRSToolStripMenuItem.Click FRReportKRS.Show() End Sub Private Sub MahasiswaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MahasiswaToolStripMenuItem.Click FRReportMahasiswa.Show() End Sub Private Sub ProgrammerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgrammerToolStripMenuItem.Click Programmer.Show() End Sub Private Sub LogOutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutToolStripMenuItem.Click SettingToolStripMenuItem.Enabled = False ReportToolStripMenuItem.Enabled = False MasterToolStripMenuItem.Enabled = False LogInToolStripMenuItem.Enabled = True LogOutToolStripMenuItem.Enabled = False TransaksiToolStripMenuItem.Enabled = False End Sub End Class

Yadi Suryadi 10260186|AMIK HASS Bandung

3. Coding Form Login
Public Class LoginForm1 Dim KNS As New OleDb.OleDbConnection Dim DA As New OleDb.OleDbDataAdapter Dim DT, DT2 As New DataTable Dim SQL, SQL2 As String Sub cari() DT.Clear() SQL = "SELECT * FROM TBLogin WHERE Nama_User='" & UsernameTextBox.Text & "'" DA.SelectCommand = New OleDb.OleDbCommand(SQL, KNS) DA.Fill(DT) End Sub Sub cari2() DT2.Clear() SQL2 = "SELECT * FROM TBLogin WHERE Password_User ='" & PasswordTextBox.Text & "'" DA.SelectCommand = New OleDb.OleDbCommand(SQL, KNS) DA.Fill(DT2) End Sub Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click On Error Resume Next cari() cari2() If DT.Rows.Count <> 0 And PasswordTextBox.Text = DT2.Rows(0)(1) Then If DT2.Rows.Count <> 0 Then MessageBox.Show("ANDA BERHASIL LOGIN", "INFORMASI", MessageBoxButtons.OK, MessageBoxIcon.Information) MenuUtama.SettingToolStripMenuItem.Enabled = True MenuUtama.ReportToolStripMenuItem.Enabled = True MenuUtama.MasterToolStripMenuItem.Enabled = True MenuUtama.TransaksiToolStripMenuItem.Enabled = True MenuUtama.LogInToolStripMenuItem.Enabled = False MenuUtama.LogOutToolStripMenuItem.Enabled = True Me.Close() Else MessageBox.Show("Nama User atau Password SALAH...!!!", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information) UsernameTextBox.Clear() PasswordTextBox.Clear()

Yadi Suryadi 10260186|AMIK HASS Bandung

UsernameTextBox.Focus() End If Else MessageBox.Show("Gagal Log In...!!!", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information) UsernameTextBox.Focus() End If Me.Close() End Sub Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click Me.Close() End Sub Private Sub LoginForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load KNS.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\KULIAH\VB.Net\Program Aplikasi Akademik\Program Aplikasi Akademik(Tugas Besar)\Program Aplikasi Akademik(Tugas Besar)\DBAkademik.mdb" End Sub End Class

4. Coding Form Dosen
Public Class FRDosen Dim daMataKuliah As OleDb.OleDbDataAdapter Dim daDosen As OleDb.OleDbDataAdapter Dim con As New OleDb.OleDbConnection(Koneksi("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=D:\KULIAH\VB.Net\Program Aplikasi Akademik\Program Aplikasi Akademik(Tugas Besar)\Program Aplikasi Akademik(Tugas Besar)\DBAkademik.mdb")) Dim dtMataKuliah As New DataTable() Dim dtDosen As New DataTable() Dim drDosen As DataRow Dim drMataKuliah As DataRow Function Koneksi(ByVal strDatabase As String) As String Dim kalimat As String kalimat = "Provider=Microsoft.Jet.OLEDB.4.0;" kalimat &= "Data Source=" & strDatabase & "" Return kalimat End Function Private Sub FRDosen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the

Yadi Suryadi 10260186|AMIK HASS Bandung

'DBAkademikDataSet1.TBDosen' table. You can move, or remove it, as needed. Me.TBDosenTableAdapter.Fill(Me.DBAkademikDataSet1.TBDosen) 'TODO: This line of code loads data into the 'DBAkademikDataSet.TBDosen' table. You can move, or remove it, as needed. Dim dc(1) As DataColumn Try daMataKuliah = New OleDb.OleDbDataAdapter("select * from TBMata_Kuliah", con) daMataKuliah.Fill(dtMataKuliah) dc(0) = dtMataKuliah.Columns("Kode_MK") dtMataKuliah.PrimaryKey = dc With cbxKode_MK .DataSource = dtMataKuliah .DisplayMember = "Kode_MK" .ValueMember = "Kode_MK" End With daDosen = New OleDb.OleDbDataAdapter("select * from TBDosen", con) daDosen.Fill(dtDosen) dc(0) = dtDosen.Columns("NIDN") dtDosen.PrimaryKey = dc DataGridView1.DataSource = dtDosen Catch errConn As OleDb.OleDbException MsgBox(errConn.Message) End Try End Sub Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click Try Dim cbTambah As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daDosen) drDosen = dtDosen.NewRow drDosen("NIDN") = txtNIDN.Text drDosen("Nama_Dosen") = txtNama.Text drDosen("Alamat") = txtAlamat.Text drDosen("Kelamin") = cbxgender.Text drDosen("Pendidikan") = cbxPendidikan.Text drDosen("Kode_MK") = cbxKode_MK.Text drDosen("Status") = cbxStatus.Text drDosen("Telepon") = txtTelepon.Text dtDosen.Rows.Add(drDosen) con.Open() daDosen.Update(dtDosen)

Yadi Suryadi 10260186|AMIK HASS Bandung

dtDosen.AcceptChanges() con.Close() Catch errTambah As Exception MsgBox(errTambah.Message) End Try kosong() End Sub Private Sub btncari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncari.Click Try drDosen = dtDosen.Rows.Find(txtNIDN.Text) txtNIDN.Text = "" txtNIDN.Text = drDosen("NIDN").ToString txtNama.Text = drDosen("Nama_Dosen").ToString txtAlamat.Text = drDosen("Alamat").ToString cbxgender.Text = drDosen("Kelamin").ToString cbxPendidikan.Text = drDosen("Pendidikan").ToString cbxKode_MK.Text = drDosen("Kode_MK").ToString cbxStatus.Text = drDosen("Status").ToString txtTelepon.Text = drDosen("Telepon").ToString Catch errCari As Exception MsgBox(errCari.Message) End Try End Sub Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndelete.Click Try Dim cbhapus As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daDosen) drDosen.Delete() daDosen.DeleteCommand = cbhapus.GetDeleteCommand daDosen.Update(dtDosen) dtDosen.AcceptChanges() daDosen.DeleteCommand.Connection.Close() Catch errHapus As Exception MsgBox(errHapus.Message) End Try kosong() End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click

Yadi Suryadi 10260186|AMIK HASS Bandung

kosong() End Sub Private Sub kosong() txtNIDN.Text = "" txtNama.Text = "" txtAlamat.Text = "" cbxgender.Text = "" cbxPendidikan.Text = "" cbxKode_MK.Text = "" cbxStatus.Text = "" txtTelepon.Text = "" txtNIDN.Focus() End Sub Private Sub cbxKode_MK_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxKode_MK.SelectedIndexChanged Try Dim drMataKuliah As DataRow drMataKuliah = dtMataKuliah.Rows.Find(cbxKode_MK.Text) txtNama_MK.Text = drMataKuliah("Nama_MK").ToString txtSKS.Text = drMataKuliah("SKS").ToString Catch errTampil As Exception End Try End Sub Private Sub btnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeluar.Click Close() End Sub Private Sub txtNIDN_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtNIDN.LostFocus Try drDosen = dtDosen.Rows.Find(txtNIDN.Text) If (txtNIDN.Text = drDosen("NIDN")) Then MsgBox("NIDN Sudah terdaftar", MsgBoxStyle.Information) txtNIDN.Text = "" txtNIDN.Focus() Else txtNama.Focus() End If Catch errCari As Exception txtNama.Focus() End Try End Sub

Yadi Suryadi 10260186|AMIK HASS Bandung

End Class

5. Coding Form Mahasiswa
Public Class FRMahasiswa Dim daMahasiswa As OleDb.OleDbDataAdapter Dim con As New OleDb.OleDbConnection(Koneksi("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=D:\KULIAH\VB.Net\Program Aplikasi Akademik\Program Aplikasi Akademik(Tugas Besar)\Program Aplikasi Akademik(Tugas Besar)\DBAkademik.mdb")) Dim dtMahasiswa As New DataTable() Dim drMahasiswa As DataRow Function Koneksi(ByVal strDatabase As String) As String Dim kalimat As String kalimat = "Provider=Microsoft.Jet.OLEDB.4.0;" kalimat &= "Data Source=" & strDatabase & "" Return kalimat End Function Private Sub FRMahasiswa_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'DBAkademikDataSet1.TBMahasiswa' table. You can move, or remove it, as needed. Me.TBMahasiswaTableAdapter.Fill(Me.DBAkademikDataSet1.TBMah asiswa)

Dim dc(1) As DataColumn Try daMahasiswa = New OleDb.OleDbDataAdapter("select * from TBMahasiswa", con) daMahasiswa = New OleDb.OleDbDataAdapter("select * from TBMahasiswa", con) daMahasiswa.Fill(dtMahasiswa) dc(0) = dtMahasiswa.Columns("NIM") dtMahasiswa.PrimaryKey = dc DgMahasiswa.DataSource = dtMahasiswa Catch errConn As OleDb.OleDbException MsgBox(errConn.Message) End Try End Sub Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click Try Dim cbMahasiswa As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daMahasiswa) drMahasiswa = dtMahasiswa.NewRow drMahasiswa("NIM") = txtNIM.Text

Yadi Suryadi 10260186|AMIK HASS Bandung

drMahasiswa("Nama_MHS") = txtNama.Text drMahasiswa("Kelamin") = cbxgender.Text drMahasiswa("Alamat") = txtAlamat.Text drMahasiswa("Semester") = cbxSemester.Text drMahasiswa("Kelas") = cbxKelas.Text drMahasiswa("jurusan") = cbxJurusan.Text drMahasiswa("Telepon") = txtTelepon.Text dtMahasiswa.Rows.Add(drMahasiswa) con.Open() daMahasiswa.Update(dtMahasiswa) dtMahasiswa.AcceptChanges() con.Close() Catch errTambah As Exception MsgBox(errTambah.Message) End Try kosong() End Sub Private Sub btncari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncari.Click Try drMahasiswa = dtMahasiswa.Rows.Find(txtNIM.Text) txtNIM.Text = "" txtNIM.Text = drMahasiswa("NIM").ToString txtNama.Text = drMahasiswa("Nama_MHS").ToString cbxgender.Text = drMahasiswa("Kelamin").ToString txtAlamat.Text = drMahasiswa("Alamat").ToString cbxSemester.Text = drMahasiswa("Semester").ToString cbxKelas.Text = drMahasiswa("Kelas").ToString cbxJurusan.Text = drMahasiswa("Jurusan").ToString txtTelepon.Text = drMahasiswa("Telepon").ToString Catch errCari As Exception MsgBox(errCari.Message) End Try End Sub Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndelete.Click Try Dim cbMahasiswa As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daMahasiswa) drMahasiswa.Delete() daMahasiswa.DeleteCommand = cbMahasiswa.GetDeleteCommand daMahasiswa.Update(dtMahasiswa) dtMahasiswa.AcceptChanges() daMahasiswa.DeleteCommand.Connection.Close()

Yadi Suryadi 10260186|AMIK HASS Bandung

Catch errHapus As Exception MsgBox(errHapus.Message) End Try kosong() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click kosong() End Sub Private Sub kosong() txtNIM.Text = "" txtNama.Text = "" cbxgender.Text = "" txtAlamat.Text = "" cbxSemester.Text = "" cbxKelas.Text = "" cbxJurusan.Text = "" txtTelepon.Text = "" txtNIM.Focus() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Close() End Sub Private Sub txtNIM_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtNIM.LostFocus Try drMahasiswa = dtMahasiswa.Rows.Find(txtNIM.Text) If (txtNIM.Text = drMahasiswa("NIM")) Then MsgBox("NIM Sudah terdaftar", MsgBoxStyle.Information) txtNIM.Text = "" txtNIM.Focus() Else txtNama.Focus() End If Catch errCari As Exception txtNama.Focus() End Try End Sub End Class

Yadi Suryadi 10260186|AMIK HASS Bandung

6. Coding Form Mata kuliah
Public Class FRMata_Kuliah Dim daDosen As OleDb.OleDbDataAdapter Dim daMataKuliah As OleDb.OleDbDataAdapter Dim con As New OleDb.OleDbConnection(Koneksi("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=D:\KULIAH\VB.Net\Program Aplikasi Akademik\Program Aplikasi Akademik(Tugas Besar)\Program Aplikasi Akademik(Tugas Besar)\DBAkademik.mdb")) Dim dtDosen As New DataTable() Dim dtMataKuliah As New DataTable() Dim drMataKuliah As DataRow Dim drDosen As DataRow Function Koneksi(ByVal strDatabase As String) As String Dim kalimat As String kalimat = "Provider=Microsoft.Jet.OLEDB.4.0;" kalimat &= "Data Source=" & strDatabase & "" Return kalimat End Function Private Sub FRMata_Kuliah_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'DBAkademikDataSet1.TBMata_Kuliah' table. You can move, or remove it, as needed. Me.TBMata_KuliahTableAdapter.Fill(Me.DBAkademikDataSet1.TBM ata_Kuliah) Dim dc(1) As DataColumn Try daDosen = New OleDb.OleDbDataAdapter("select * from TBDosen", con) daDosen.Fill(dtDosen) dc(0) = dtDosen.Columns("NIDN") dtDosen.PrimaryKey = dc With cbxNIDN .DataSource = dtDosen .DisplayMember = "NIDN" .ValueMember = "NIDN" End With daMataKuliah = New OleDb.OleDbDataAdapter("select * from TBMata_Kuliah", con) daMataKuliah.Fill(dtMataKuliah) dc(0) = dtMataKuliah.Columns("Kode_MK") dtMataKuliah.PrimaryKey = dc DataGridView1.DataSource = dtMataKuliah Catch errConn As OleDb.OleDbException MsgBox(errConn.Message) End Try End Sub

Yadi Suryadi 10260186|AMIK HASS Bandung

Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click Try Dim cbTambah As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daMataKuliah) drMataKuliah = dtMataKuliah.NewRow drMataKuliah("Kode_MK") = txtkodeMK.Text drMataKuliah("Nama_MK") = txtNamaMK.Text drMataKuliah("SKS") = cbxSKS.Text drMataKuliah("NIDN") = cbxNIDN.Text dtMataKuliah.Rows.Add(drMataKuliah) con.Open() daMataKuliah.Update(dtMataKuliah) dtMataKuliah.AcceptChanges() con.Close() Catch errTambah As Exception MsgBox(errTambah.Message) End Try kosong() End Sub Private Sub btncari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncari.Click Try drMataKuliah = dtMataKuliah.Rows.Find(txtkodeMK.Text) txtkodeMK.Text = drMataKuliah("Kode_MK").ToString txtNamaMK.Text = drMataKuliah("Nama_MK").ToString cbxSKS.Text = drMataKuliah("SKS").ToString cbxNIDN.Text = drMataKuliah("NIDN").ToString Catch errCari As Exception MsgBox(errCari.Message) End Try End Sub Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndelete.Click Try Dim cbhapus As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daMataKuliah) drMataKuliah.Delete() daMataKuliah.DeleteCommand = cbhapus.GetDeleteCommand daMataKuliah.Update(dtMataKuliah)

Yadi Suryadi 10260186|AMIK HASS Bandung

dtMataKuliah.AcceptChanges() daMataKuliah.DeleteCommand.Connection.Close() Catch errHapus As Exception MsgBox(errHapus.Message) End Try kosong() End Sub Private Sub cbxNIDN_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxNIDN.SelectedIndexChanged Try Dim drDosen As DataRow drDosen = dtDosen.Rows.Find(cbxNIDN.Text) txtDosen.Text = drDosen("Nama_Dosen").ToString Catch errTampil As Exception End Try End Sub Private Sub btnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeluar.Click Close() End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click kosong() End Sub Private Sub kosong() txtkodeMK.Text = "" txtNamaMK.Text = "" cbxSKS.Text = "" cbxNIDN.Text = "" txtDosen.Text = "" txtkodeMK.Focus() End Sub Private Sub txtkodeMK_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtkodeMK.LostFocus Try drMataKuliah = dtMataKuliah.Rows.Find(txtkodeMK.Text) If (txtkodeMK.Text = drMataKuliah("Kode_MK")) Then MsgBox("Kode MK Sudah terdaftar", MsgBoxStyle.Information) txtkodeMK.Text = "" txtkodeMK.Focus() Else

Yadi Suryadi 10260186|AMIK HASS Bandung

txtNamaMK.Focus() End If Catch errCari As Exception txtNamaMK.Focus() End Try End Sub End Class

7. Coding Form Biaya
Public Class FRBiaya Dim daBiaya As OleDb.OleDbDataAdapter Dim con As New OleDb.OleDbConnection(Koneksi("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=D:\KULIAH\VB.Net\Program Aplikasi Akademik\Program Aplikasi Akademik(Tugas Besar)\Program Aplikasi Akademik(Tugas Besar)\DBAkademik.mdb")) Dim dtBiaya As New DataTable() Dim drBiaya As DataRow Function Koneksi(ByVal strDatabase As String) As String Dim kalimat As String kalimat = "Provider=Microsoft.Jet.OLEDB.4.0;" kalimat &= "Data Source=" & strDatabase & "" Return kalimat End Function Private Sub FRBiaya_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'DBAkademikDataSet1.TBBiaya' table. You can move, or remove it, as needed. Me.TBBiayaTableAdapter.Fill(Me.DBAkademikDataSet1.TBBiaya)

Dim dc(1) As DataColumn Try daBiaya = New OleDb.OleDbDataAdapter("select * from TBBiaya", con) daBiaya = New OleDb.OleDbDataAdapter("select * from TBBiaya", con) daBiaya.Fill(dtBiaya) dc(0) = dtBiaya.Columns("Kode_Biaya") dtBiaya.PrimaryKey = dc DataGridView1.DataSource = dtBiaya Catch errConn As OleDb.OleDbException MsgBox(errConn.Message) End Try End Sub Private Sub btnSimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSimpan.Click Try

Yadi Suryadi 10260186|AMIK HASS Bandung

Dim cbMahasiswa As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daBiaya) drBiaya = dtBiaya.NewRow drBiaya("Kode_Biaya") = txtKodeBiaya.Text drBiaya("Biaya_SPP") = Val(txtSPP.Text) drBiaya("Biaya_Semester") = Val(txtBYSem.Text) drBiaya("Biaya_Perpus") = Val(txtPerpus.Text) dtBiaya.Rows.Add(drBiaya) con.Open() daBiaya.Update(dtBiaya) dtBiaya.AcceptChanges() con.Close() Catch errTambah As Exception MsgBox(errTambah.Message) End Try kosong() End Sub Private Sub btnCari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCari.Click Try drBiaya = dtBiaya.Rows.Find(txtKodeBiaya.Text) txtKodeBiaya.Text = "" txtKodeBiaya.Text = drBiaya("Kode_Biaya").ToString txtSPP.Text = drBiaya("Biaya_SPP").ToString txtBYSem.Text = drBiaya("Biaya_Semester").ToString txtPerpus.Text = drBiaya("Biaya_Perpus").ToString Catch errCari As Exception MsgBox(errCari.Message) End Try End Sub Private Sub btnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHapus.Click Try Dim cbMahasiswa As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daBiaya) drBiaya.Delete() daBiaya.DeleteCommand = cbMahasiswa.GetDeleteCommand daBiaya.Update(dtBiaya) dtBiaya.AcceptChanges() daBiaya.DeleteCommand.Connection.Close() Catch errHapus As Exception MsgBox(errHapus.Message) End Try kosong()

Yadi Suryadi 10260186|AMIK HASS Bandung

End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click kosong() End Sub Private Sub kosong() txtKodeBiaya.Text = "" txtSPP.Text = "" txtBYSem.Text = "" txtPerpus.Text = "" txtKodeBiaya.Focus() End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Close() End Sub Private Sub txtKodeBiaya_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtKodeBiaya.LostFocus Try drBiaya = dtBiaya.Rows.Find(txtKodeBiaya.Text) If (txtKodeBiaya.Text = drBiaya("Kode_Biaya")) Then MsgBox("Kode Biaya Sudah terdaftar", MsgBoxStyle.Information) txtKodeBiaya.Text = "" txtKodeBiaya.Focus() Else txtSPP.Focus() End If Catch errCari As Exception txtSPP.Focus() End Try End Sub End Class

8. Coding Form Transaksi
Public Class FRTransaksi Dim daTransaksi As OleDb.OleDbDataAdapter Dim daMahasiswa As OleDb.OleDbDataAdapter Dim daBiaya As OleDb.OleDbDataAdapter Dim con As New OleDb.OleDbConnection(Koneksi("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=D:\KULIAH\VB.Net\Program Aplikasi Akademik\Program Aplikasi Akademik(Tugas Besar)\Program Aplikasi Akademik(Tugas Besar)\DBAkademik.mdb")) Dim dtTransaksi As New DataTable()

Yadi Suryadi 10260186|AMIK HASS Bandung

Dim Dim Dim Dim Dim

dtMahasiswa As New DataTable() dtBiaya As New DataTable() drTransaksi As DataRow drMahasiswa As DataRow drBiaya As DataRow

Function Koneksi(ByVal strDatabase As String) As String Dim kata As String kata = "Provider=Microsoft.Jet.OLEDB.4.0;" kata &= "Data Source=" & strDatabase & "" Return kata End Function Private Sub kosong() txtKode_Transaksi.Text = "" cbxNIM.Text = "" txtNama.Text = "" txtSPP.Text = "" txtBYSemester.Text = "" txtPerpustakaan.Text = "" cbxBiaya.Text = "" cbxpembayaran.Text = "" txtBulan.Text = "" lbTotal.Text = "" txtKode_Transaksi.Focus() End Sub Private Sub FRTransaksi_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'DBAkademikDataSet1.TBTransaksi' table. You can move, or remove it, as needed. Me.TBTransaksiTableAdapter.Fill(Me.DBAkademikDataSet1.TBTra nsaksi) Dim dc(1) As DataColumn Try daMahasiswa = New OleDb.OleDbDataAdapter("select * from TBMahasiswa", con) daMahasiswa.Fill(dtMahasiswa) dc(0) = dtMahasiswa.Columns("NIM") dtMahasiswa.PrimaryKey = dc With cbxNIM .DataSource = dtMahasiswa .DisplayMember = "NIM" .ValueMember = "NIM" End With daBiaya = New OleDb.OleDbDataAdapter("select * from TBBiaya", con) daBiaya.Fill(dtBiaya) dc(0) = dtBiaya.Columns("Kode_Biaya") dtBiaya.PrimaryKey = dc

Yadi Suryadi 10260186|AMIK HASS Bandung

With cbxBiaya .DataSource = dtBiaya .DisplayMember = "Kode_Biaya" .ValueMember = "Kode_Biaya" End With daTransaksi = New OleDb.OleDbDataAdapter("select * from TBTransaksi", con) daTransaksi.Fill(dtTransaksi) dc(0) = dtTransaksi.Columns("Kode_Transaksi") dtTransaksi.PrimaryKey = dc DataGridView1.DataSource = dtTransaksi Catch errConn As OleDb.OleDbException MsgBox(errConn.Message) End Try kosong() End Sub Private Sub btnSimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSimpan.Click Try Dim cbTambah As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daTransaksi) drTransaksi = dtTransaksi.NewRow

drTransaksi("Kode_Transaksi") = txtKode_Transaksi.Text drTransaksi("NIM") = cbxNIM.Text drTransaksi("Kode_Biaya") = cbxBiaya.Text drTransaksi("Pembayaran") = cbxpembayaran.Text drTransaksi("Selama") = txtBulan.Text drTransaksi("Total") = lbTotal.Text dtTransaksi.Rows.Add(drTransaksi) con.Open() daTransaksi.Update(dtTransaksi) dtTransaksi.AcceptChanges() con.Close() Catch errTambah As Exception MsgBox(errTambah.Message) End Try kosong() End Sub Private Sub btnCari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCari.Click Try drTransaksi = dtTransaksi.Rows.Find(txtKode_Transaksi.Text)

Yadi Suryadi 10260186|AMIK HASS Bandung

txtKode_Transaksi.Text = "" txtKode_Transaksi.Text = drTransaksi("Kode_Transaksi").ToString cbxNIM.Text = drTransaksi("NIM").ToString cbxBiaya.Text = drTransaksi("Kode_Biaya").ToString cbxpembayaran.Text = drTransaksi("Pembayaran").ToString txtBulan.Text = drTransaksi("Selama").ToString lbTotal.Text = drTransaksi("Total").ToString

Catch errCari As Exception MsgBox(errCari.Message) End Try End Sub Private Sub btnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHapus.Click Try Dim cbhapus As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daTransaksi) drTransaksi.Delete() daTransaksi.DeleteCommand = cbhapus.GetDeleteCommand daTransaksi.Update(dtTransaksi) dtTransaksi.AcceptChanges() daTransaksi.DeleteCommand.Connection.Close() Catch errHapus As Exception MsgBox(errHapus.Message) End Try kosong() End Sub Private Sub cbxNIM_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxNIM.SelectedIndexChanged Try Dim drMahasiswa As DataRow drMahasiswa = dtMahasiswa.Rows.Find(cbxNIM.Text) txtNama.Text = drMahasiswa("Nama_MHS").ToString Catch errTampil As Exception End Try End Sub Private Sub cbxBiaya_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxBiaya.SelectedIndexChanged Try

Yadi Suryadi 10260186|AMIK HASS Bandung

Dim drBiaya As DataRow drBiaya = dtBiaya.Rows.Find(cbxBiaya.Text) txtSPP.Text = drBiaya("Biaya_SPP").ToString txtBYSemester.Text = drBiaya("Biaya_Semester").ToString txtPerpustakaan.Text = drBiaya("Biaya_Perpus").ToString Catch errTampil As Exception End Try End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click kosong() End Sub Private Sub btnKELUAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKELUAR.Click Close() End Sub Private Sub cbxpembayaran_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxpembayaran.SelectedIndexChanged If (cbxpembayaran.Text = "SPP") Then txtSPP.Enabled = True txtBYSemester.Enabled = False txtPerpustakaan.Enabled = False ElseIf (cbxpembayaran.Text = "Biaya Semester") Then txtBYSemester.Enabled = True txtSPP.Enabled = False txtPerpustakaan.Enabled = False Else txtPerpustakaan.Enabled = True txtSPP.Enabled = False txtBYSemester.Enabled = False End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim total, spp, semester, perpus, bulan As Integer spp = Val(txtSPP.Text) semester = Val(txtBYSemester.Text) perpus = Val(txtPerpustakaan.Text) bulan = Val(txtBulan.Text) If (cbxpembayaran.Text = "SPP") Then total = bulan * spp ElseIf (cbxpembayaran.Text = "Biaya Semester") Then total = bulan * semester Else total = bulan * perpus

Yadi Suryadi 10260186|AMIK HASS Bandung

End If lbTotal.Text = total End Sub Private Sub txtKode_Transaksi_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtKode_Transaksi.LostFocus Try drTransaksi = dtTransaksi.Rows.Find(txtKode_Transaksi.Text) If (txtKode_Transaksi.Text = drTransaksi("Kode_Transaksi")) Then MsgBox("Kode Transaksi Sudah terdaftar", MsgBoxStyle.Information) txtKode_Transaksi.Text = "" txtKode_Transaksi.Focus() Else cbxNIM.Focus() End If Catch errCari As Exception cbxNIM.Focus() End Try End Sub End Class

Yadi Suryadi 10260186|AMIK HASS Bandung

9. Coding Form KRS(Kartu Rencana Study)
Public Class FRKRS Dim daKRS As OleDb.OleDbDataAdapter Dim daMahasiswa As OleDb.OleDbDataAdapter Dim daMataKuliah As OleDb.OleDbDataAdapter Dim con As New OleDb.OleDbConnection(Koneksi("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=D:\KULIAH\VB.Net\Program Aplikasi Akademik\Program Aplikasi Akademik(Tugas Besar)\Program Aplikasi Akademik(Tugas Besar)\DBAkademik.mdb")) Dim dtKRS As New DataTable() Dim dtMahasiswa As New DataTable() Dim dtMataKuliah As New DataTable() Dim drKRS As DataRow Dim drMahasiswa As DataRow Dim drMataKuliah As DataRow Function Koneksi(ByVal strDatabase As String) As String Dim kata As String kata = "Provider=Microsoft.Jet.OLEDB.4.0;" kata &= "Data Source=" & strDatabase & "" Return kata End Function Private Sub kosong() Kode_KRSTextBox.Text = "" NIMComboBox.Text = "" txtNama.Text = "" txtNamaMK.Text = "" Kode_MKComboBox.Text = "" Nilai_UTSTextBox.Text = "" Nilai_UASTextBox.Text = "" Total_NilaiTextBox.Text = "" GradeTextBox.Text = "" Kode_KRSTextBox.Focus() End Sub Private Sub FRKRS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'DBAkademikDataSet2.TBKRS' table. You can move, or remove it, as needed. Me.TBKRSTableAdapter.Fill(Me.DBAkademikDataSet2.TBKRS) Dim dc(1) As DataColumn Try daMahasiswa = New OleDb.OleDbDataAdapter("select * from TBMahasiswa", con) daMahasiswa.Fill(dtMahasiswa) dc(0) = dtMahasiswa.Columns("NIM") dtMahasiswa.PrimaryKey = dc With NIMComboBox .DataSource = dtMahasiswa .DisplayMember = "NIM"

Yadi Suryadi 10260186|AMIK HASS Bandung

.ValueMember = "NIM" End With daMataKuliah = New OleDb.OleDbDataAdapter("select * from TBMata_Kuliah", con) daMataKuliah.Fill(dtMataKuliah) dc(0) = dtMataKuliah.Columns("Kode_MK") dtMataKuliah.PrimaryKey = dc With Kode_MKComboBox .DataSource = dtMataKuliah .DisplayMember = "Kode_MK" .ValueMember = "Kode_MK" End With daKRS = New OleDb.OleDbDataAdapter("select * from TBKRS", con) daKRS.Fill(dtKRS) dc(0) = dtKRS.Columns("Kode_KRS") dtKRS.PrimaryKey = dc DataGridView1.DataSource = dtKRS Catch errConn As OleDb.OleDbException MsgBox(errConn.Message) End Try kosong() End Sub Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click Try Dim cbTambah As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daKRS) drKRS = dtKRS.NewRow

drKRS("Kode_KRS") = Kode_KRSTextBox.Text drKRS("NIM") = NIMComboBox.Text drKRS("Kode_MK") = Kode_MKComboBox.Text drKRS("Nilai_UTS") = Nilai_UTSTextBox.Text drKRS("Nilai_UAS") = Nilai_UASTextBox.Text drKRS("Total_Nilai") = Total_NilaiTextBox.Text drKRS("Grade") = GradeTextBox.Text dtKRS.Rows.Add(drKRS) con.Open() daKRS.Update(dtKRS) dtKRS.AcceptChanges() con.Close()

Yadi Suryadi 10260186|AMIK HASS Bandung

Catch errTambah As Exception MsgBox(errTambah.Message) End Try kosong() End Sub Private Sub btncari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncari.Click Try drKRS = dtKRS.Rows.Find(Kode_KRSTextBox.Text) Kode_KRSTextBox.Text = "" Kode_KRSTextBox.Text = drKRS("Kode_KRS").ToString NIMComboBox.Text = drKRS("NIM").ToString Kode_MKComboBox.Text = drKRS("Kode_MK").ToString Nilai_UTSTextBox.Text = drKRS("Nilai_UTS").ToString Nilai_UASTextBox.Text = drKRS("Nilai_UAS").ToString Total_NilaiTextBox.Text = drKRS("Total_Nilai").ToString GradeTextBox.Text = drKRS("Grade").ToString Catch errCari As Exception MsgBox(errCari.Message) End Try End Sub Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndelete.Click Try Dim cbhapus As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daKRS) drKRS.Delete() daKRS.DeleteCommand = cbhapus.GetDeleteCommand daKRS.Update(dtKRS) dtKRS.AcceptChanges() daKRS.DeleteCommand.Connection.Close() Catch errHapus As Exception MsgBox(errHapus.Message) End Try kosong() End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click kosong() End Sub Private Sub btnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeluar.Click Close()

Yadi Suryadi 10260186|AMIK HASS Bandung

End Sub Private Sub NIMComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NIMComboBox.SelectedIndexChanged Try Dim drMahasiswa As DataRow drMahasiswa = dtMahasiswa.Rows.Find(NIMComboBox.Text) txtNama.Text = drMahasiswa("Nama_MHS").ToString Catch errTampil As Exception End Try End Sub Private Sub Kode_MKComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kode_MKComboBox.SelectedIndexChanged Try Dim drMataKuliah As DataRow drMataKuliah = dtMataKuliah.Rows.Find(Kode_MKComboBox.Text) txtNamaMK.Text = drMataKuliah("Nama_MK").ToString Catch errTampil As Exception End Try End Sub Private Sub Total_NilaiTextBox_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Total_NilaiTextBox.LostFocus Dim nilai As Decimal nilai = Val(Total_NilaiTextBox.Text) If (nilai >= 90) Then GradeTextBox.Text = "A" ElseIf (nilai >= 75) And (nilai <= 89) Then GradeTextBox.Text = "B" ElseIf (nilai >= 60) And (nilai <= 74) Then GradeTextBox.Text = "C" ElseIf (nilai >= 59) Then GradeTextBox.Text = "D" Else GradeTextBox.Text = "E" End If End Sub Private Sub Nilai_UASTextBox_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Nilai_UASTextBox.LostFocus Dim UTS, UAS, Total As Decimal UTS = Val(Nilai_UTSTextBox.Text) UAS = Val(Nilai_UASTextBox.Text)

Yadi Suryadi 10260186|AMIK HASS Bandung

Total = (UTS + UAS) / 2 Total_NilaiTextBox.Text = Total End Sub Private Sub Kode_KRSTextBox_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Kode_KRSTextBox.LostFocus Try drKRS = dtKRS.Rows.Find(Kode_KRSTextBox.Text) If (Kode_KRSTextBox.Text = drKRS("Kode_KRS")) Then MsgBox("Kode KRS Sudah terdaftar", MsgBoxStyle.Information) Kode_KRSTextBox.Text = "" Kode_KRSTextBox.Focus() Else NIMComboBox.Focus() End If Catch errCari As Exception NIMComboBox.Focus() End Try End Sub End Class

10.Coding Form User
Public Class FRUser Dim daUser As OleDb.OleDbDataAdapter Dim con As New OleDb.OleDbConnection(Koneksi("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=D:\KULIAH\VB.Net\Program Aplikasi Akademik\Program Aplikasi Akademik(Tugas Besar)\Program Aplikasi Akademik(Tugas Besar)\DBAkademik.mdb")) Dim dtUser As New DataTable() Dim drUser As DataRow Function Koneksi(ByVal strDatabase As String) As String Dim kalimat As String kalimat = "Provider=Microsoft.Jet.OLEDB.4.0;" kalimat &= "Data Source=" & strDatabase & "" Return kalimat End Function Private Sub FRUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'DBAkademikDataSet2.TBLogin' table. You can move, or remove it, as needed. Me.TBLoginTableAdapter.Fill(Me.DBAkademikDataSet2.TBLogin) Dim dc(1) As DataColumn Try

Yadi Suryadi 10260186|AMIK HASS Bandung

daUser = New OleDb.OleDbDataAdapter("select * from TBLogin", con) daUser = New OleDb.OleDbDataAdapter("select * from TBLogin", con) daUser.Fill(dtUser) dc(0) = dtUser.Columns("Nama_User") dtUser.PrimaryKey = dc DataGridView1.DataSource = dtUser Catch errConn As OleDb.OleDbException MsgBox(errConn.Message) End Try End Sub Private Sub btnSimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSimpan.Click Try Dim cbUser As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daUser) drUser = dtUser.NewRow

drUser("Nama_User") = txtNama.Text drUser("Password_User") = txtPassword.Text dtUser.Rows.Add(drUser) con.Open() daUser.Update(dtUser) dtUser.AcceptChanges() con.Close() Catch errTambah As Exception MsgBox(errTambah.Message) End Try kosong() End Sub Private Sub btnCari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCari.Click Try drUser = dtUser.Rows.Find(txtNama.Text) txtNama.Text = drUser("Nama_User").ToString txtPassword.Text = drUser("Password_User").ToString Catch errCari As Exception MsgBox(errCari.Message) End Try End Sub

Yadi Suryadi 10260186|AMIK HASS Bandung

Private Sub btnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHapus.Click Try Dim cbUser As OleDb.OleDbCommandBuilder = New OleDb.OleDbCommandBuilder(daUser) drUser.Delete() daUser.DeleteCommand = cbUser.GetDeleteCommand daUser.Update(dtUser) dtUser.AcceptChanges() daUser.DeleteCommand.Connection.Close() Catch errHapus As Exception MsgBox(errHapus.Message) End Try kosong() End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click kosong() End Sub Private Sub kosong() txtNama.Text = "" txtPassword.Text = "" txtNama.Focus() End Sub Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click Close() End Sub Private Sub txtNama_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtNama.LostFocus Try drUser = dtUser.Rows.Find(txtNama.Text) If (txtNama.Text = drUser("Nama_User")) Then MsgBox("Nama User Sudah terdaftar, Gunakan Nama Unik Lain..!!!", MsgBoxStyle.Information) txtNama.Text = "" txtNama.Focus() Else txtPassword.Focus() End If Catch errCari As Exception

Yadi Suryadi 10260186|AMIK HASS Bandung

txtPassword.Focus() End Try End Sub End Class

Yadi Suryadi 10260186|AMIK HASS Bandung

BAB III PENUTUP
A. Kesimpulan
Secara umum makalah ppemograman berorientasi objek dengan Visual Studio 2005 dengan judul “Program Aplikasi Akakdemik” ini dibuat untuk mengetahui bagaimana mengelola system informasi akademik dengan baik agar mudah di mengerti dan di pahami oleh pihak yang memerlukan informasi tersebut.

B. Saran
✔ Duharapkan Makalah ini berguna dan dapat menjadi sarana pembelajar oleh pembaca, semoga pembaca menjadi lebih paham mengenai database dan aplikasi lain pendukungnya. ✔ Selain memahami database yang ada pada makalah ini, diharapkan pembaca juga bias memperoleh informasi dari sumber-sumber lain yang membantu dalam mempeklajari database dan aplikasi visual studio. ✔ Aplikasi visual studio 2005 dirancang agar lebih mudah di pelajari dn dipakai dalam aplikasi-aplikasi yang akan dibuat sesuai dengan kebutuhan tidak hanya database saja, tapi pembuatan aplikasi lainnya.

Yadi Suryadi 10260186|AMIK HASS Bandung

You're Reading a Free Preview

Herunterladen
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->