Aplikasi Pengolahan Data Kartu Anggota Di Forum Komunikasi 76 Jabar-Banten
Simbol Diagram Alir Dokumen SIMBOL NAMA KETERANGAN
Proses Merupakan proses komputer yang terjadi didalam aliran dokumen Aliran Menunjukkan data – data yang mengalir pada sistem
Proses Manual Merupakan proses yang terjadi didalam Flow Map
Dokumen Dokumen yang ada dalam Flow Map Offline Storage
Menunjukkan tempat penyimpanan data berupa arsip
Entity Suatu objek yang dapat diidentifikasi
dalam lingkungan pemakai Garis Menunjukkan penghubung antara relasi dengan entitas dan entitas dengan atributnya
Relationship Menunjukkan adanya hubungan diantara sejumlah entitas yang berbeda Atribut Menunjukkan kumpulan elemen data yang membentuk suatu entity
DAFTAR TABEL
vi
Tabel 3.1 Skenario Login............………………………………….……………28 Tabel 3.2 Skenario Pengolahan Anggota.………………………………………
30 Tabel 3.3 Skenario Pengolahan Data Anggota.…………………………………
31
KATA PENGANTAR
Segala puji syukur dipersembahkan hanya kepada Allah SWT, satu - satunya
Dzat yang tidak pernah pamrih melimpahkan seluruh kasih saying-Nya, sehingga
dapat menyelesaikan penyusunan laporan Kerja Praktek untuk memenuhi salah satu
persyaratan dalam menempuh mata kuliah Praktek Kerja Lapangan (PKL) pada
Fakultas Teknik dan Ilmu Komputer Jurusan Teknik Informatika Universitas
Komputer Indonesia (UNIKOM). Tidak lupa shalawat serta salam semoga tercurah
atas Baginda Rasul Muhammad SAW.Pada kesempatan ini, ingin mengucapkan banyak terima kasih kepada Dosen
Pembimbing yang telah membantu penulis secara langsung dalam menyelesaikan
penyusunan laporan Kerja Praktek ini. Penghargaan yang setinggi - tingginya kepada
Ibu yang dengan sabar dan tanpa mengenal lelah selalu mengarahkan penulis untuk
terus melakukan yang terbaik dari awal hingga akhir penyusunan laporan Kerja
Praktek ini.Ucapan terima kasih ini juga penulis haturkan kepada pihak - pihak yang
secara tidak langsung telah membantu dalam menyelesaikan penyusunan laporan
Kerja Praktek ini, diantaranya : 1.Terima kasih kepada Kedua Orang Tua kami yang selalu memberikan dorongan semangat dan saran – sarannya.
2. Terima kasih kepada Dosen Pembimbing Ibu Rani Susanto, S.Kom.
3. Kepada para Staf dan Pegawai yang ada di Forum Komunikasi 76 Jabar - Banten yang telah memberikan ide – ide sehingga laporan Kerja Praktek ini dapat terselesaikan.
4. Rekan - rekan Mahasiswa yang berada di lingkungan UNIKOM.
5. Rekan - rekan lain yang tidak dapat disebutkan satu per satu dalam lembar ini
dan sekecil apapun bantuan dan dukungan yang diberikan sangat berarti.
i
Laporan ini masih jauh dari kesempurnaan, baik dari segi penyajian materi
maupun sistematika penulisan. Untuk itu diharapkan saran dan kritik yang
membangun dari pembaca sekalian guna memperbaiki kesalahan - kesalahan yang
terjadi, sehingga pada masa yang akan datang tata tulis laporan ilmiah akan menjadi
jauh lebih baik lagi.Bandung, 25 Januari 2012 Penulis
ii
LAMPIRAN A
LISTING PROGRAM
Login
Public Class LoginForm1 Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Dim login = Me.UserpassTableAdapter1.usernamepasswordstring(UsernameTextBox.Text, PasswordTextBox.Text) If UsernameTextBox.Text = "" Then MsgBox("username kosong") UsernameTextBox.Focus() ElseIf login Is Nothing Then MsgBox("username atau passwors salah") End Else Form1.ShowDialog() Me.Close() UsernameTextBox.Text = "" PasswordTextBox.Text = "" UsernameTextBox.Focus() End If End Sub Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click If MessageBox.Show("Do you want to exit?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then End Else End If End Sub Private Sub LoginForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class
Pengolahan Anggota dan Data Anggota
Imports System.IO Imports System.Data.OleDb Public Class Form1 Dim con As New OleDb.OleDbConnection Dim cnnOLEDB As New OleDbConnection Dim cmdOLEDB As New OleDbCommand Dim cmdInsert As New OleDbCommand Dim cmdUpdate As New OleDbCommand Dim cmdDelete As New OleDbCommand Sub Data_anggota() Call Koneksi() Ds = New DataSet Tabel = "SELECT * FROM anggota" Grid = New OleDb.OleDbDataAdapter(Tabel, Database) Grid.Fill(Ds, "anggota") Dim GridView As New DataView(Ds.Tables("anggota")) DGanggota.DataSource = GridView DataGridView2.DataSource = GridView End Sub Sub No_anggota() Call Koneksi() Tampil.Connection = Database Tampil.CommandType = CommandType.Text Tampil.CommandText = "select * from anggota" Tampilkan = Tampil.ExecuteReader If Tampilkan.HasRows = True Then While Tampilkan.Read() Id_anggotaTextBox.Text = Tampilkan("id_anggota") End While Id_anggotaTextBox.Text = Id_anggotaTextBox.Text + 1 NamaTextBox.Focus() Else Id_anggotaTextBox.Text = "1" End If End Sub Sub Kosong() NamaTextBox.Text = "" AlamatTextBox.Text = "" No_hpTextBox.Text = "" PekerjaanTextBox.Text = "" End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cnnOLEDB = New OleDb.OleDbConnection cnnOLEDB.ConnectionString
= "Provider=Microsoft.Jet.OLEDB.12.0;Data Source=" & System.Environment.CurrentDirectory & "\fk76.accdb" 'TODO: This line of code loads data into the 'Fk76DataSet1.anggota' table. You can move, or remove it, as needed.
Me.AnggotaTableAdapter.Fill(Me.Fk76DataSet1.anggota) 'TODO: This line of code loads data into the 'Fk76DataSet1.anggota' table. You can move, or remove it, as needed.
Me.AnggotaTableAdapter.Fill(Me.Fk76DataSet1.anggota) 'TODO: This line of code loads data into the 'Fk76DataSet.userpass' table. You can move, or remove it, as needed.
Me.UserpassTableAdapter.Fill(Me.Fk76DataSet.userpass) Call Data_anggota() Call Koneksi() End Sub Private Sub AnggotaBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Validate() Me.AnggotaBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.Fk76DataSet) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Call Kosong() End Sub Private Sub cancelbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub savebutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) If NamaTextBox.Text = "" Then Exit Sub If AlamatTextBox.Text = "" Then Exit Sub If genderComboBox.Text = "" Then Exit Sub If kotaComboBox.Text = "" Then Exit Sub If No_hpTextBox.Text = "" Then Exit Sub If agamaComboBox.Text = "" Then Exit Sub If PekerjaanTextBox.Text = "" Then Exit Sub Try Call Koneksi() Dim ms As New MemoryStream PictureBox1.Image.Save(ms, PictureBox1.Image.RawFormat) Dim arrayImage() As Byte = ms.GetBuffer ms.Close() DMLSql.Connection = Database DMLSql.CommandType = CommandType.Text DMLSql.CommandText = "insert into anggota values('','" & NamaTextBox.Text & "','" & AlamatTextBox.Text & "','" & Val(kotaComboBox.Text) & "','" & Tgl_lahirDateTimePicker.Value & "','"
Val(agamaComboBox.Text) & "','" & PekerjaanTextBox.Text & "',?, '" & CDate(Format(Now, "dd/MM/yyyy")) & "','" & CDate(Format(Now, "dd/MM/yyyy")) & "', 'aktif')" DMLSql.Parameters.Add("@foto", OleDb.OleDbType.LongVarBinary).Value = arrayImage DMLSql.ExecuteNonQuery() Call Kosong() Catch ex As Exception MsgBox(ex.ToString()) End Try End Sub Private Sub browseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) FotoOpenFileDialog.Filter = "Jpeg|*.JPG|Bitmap|
- .BMP|Gif|*.Gif" FotoOpenFileDialog.RestoreDirectory = True FotoOpenFileDialog.ShowDialog() If FotoOpenFileDialog.FileName = "" Then Exit Sub PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage PictureBox1.ImageLocation = FotoOpenFileDialog.FileName photoForm.PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage photoForm.PictureBox1.ImageLocation = FotoOpenFileDialog.FileName
End Sub Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles FotoOpenFileDialog.FileOk End Sub Private Sub deleteButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) PictureBox1.Image = Nothing photoForm.PictureBox1.Image = Nothing End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) photoForm.ShowDialog() End Sub Private Sub AnggotaBindingNavigator_RefreshItems(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub NamaTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Select Case e.KeyChar Case Chr(65) To Chr(90) Case Chr(97) To Chr(122) Case Chr(32)
Case Else e.KeyChar = Chr(0) End Select End Sub Private Sub NamaTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub NamaTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) If NamaTextBox.Text.Length = 0 Then ErrorProvider1.SetError(NamaTextBox, "Nama Harus Diisi !!") Else ErrorProvider1.Clear() End If End Sub Private Sub PekerjaanTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Select Case e.KeyChar Case Chr(65) To Chr(90) Case Chr(97) To Chr(122) Case Chr(32) Case Chr(8) Case Else e.KeyChar = Chr(0) End Select End Sub Private Sub PekerjaanTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub No_hpTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Select Case e.KeyChar Case Chr(48) To Chr(57) Case Chr(8) Case Else e.KeyChar = Chr(0) End Select End Sub Private Sub No_hpTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub kotaComboBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Select Case e.KeyChar
End Select End Sub Private Sub kotaComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub AlamatTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub AlamatTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) If AlamatTextBox.Text.Length = 0 Then ErrorProvider1.SetError(AlamatTextBox, "Alamat Harus Diisi !!") Else ErrorProvider1.Clear() End If End Sub Private Sub kotaComboBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) If kotaComboBox.Text.Length = 0 Then ErrorProvider1.SetError(kotaComboBox, "kota Harus Diisi !!") Else ErrorProvider1.Clear() End If End Sub Private Sub Tgl_lahirDateTimePicker_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) If Tgl_lahirDateTimePicker.Text.Length = 0 Then ErrorProvider1.SetError(Tgl_lahirDateTimePicker, "kota Harus Diisi !!") Else ErrorProvider1.Clear() End If End Sub Private Sub Tgl_lahirDateTimePicker_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub genderComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub genderComboBox_Validating(ByVal sender As Object, ByVal
If genderComboBox.Text.Length = 0 Then ErrorProvider1.SetError(genderComboBox, "gender Harus Diisi !!") Else ErrorProvider1.Clear() End If End Sub Private Sub No_hpTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) If No_hpTextBox.Text.Length = 0 Or No_hpTextBox.Text.Length <
11 Then ErrorProvider1.SetError(No_hpTextBox, "no hp Harus Diisi !!") Else ErrorProvider1.Clear() End If End Sub Private Sub agamaComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) If agamaComboBox.Text.Length = 0 Then ErrorProvider1.SetError(agamaComboBox, "agama Harus Diisi !!") Else ErrorProvider1.Clear() End If End Sub Private Sub PekerjaanTextBox_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) If PekerjaanTextBox.Text.Length = 0 Then ErrorProvider1.SetError(PekerjaanTextBox, "pekerjaan Harus Diisi !!") Else ErrorProvider1.Clear() End If End Sub Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub PictureBox1_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) If NamaTextBox.Text.Length = 0 Then ErrorProvider1.SetError(PictureBox1, "foto harus dimasukin !!") Else ErrorProvider1.Clear() End If
Private Sub No_hpTextBox_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles No_hpTextBox.TextChanged End Sub Private Sub No_hpTextBox_Validating1(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles No_hpTextBox.Validating End Sub Private Sub savebutton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles savebutton.Click Call Koneksi() con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" _ & "Data Source=C:\fk76.accdb;" _ & "Persist Security Info=False" con.Open() cmdInsert.CommandText = "insert into anggota values('','" & NamaTextBox.Text & "','" & AlamatTextBox.Text & "','" & Val(kotaComboBox.Text) & "','" & Tgl_lahirDateTimePicker.Value & "','" & Val(genderComboBox.Text) & "','" & No_hpTextBox.Text & "','" & Val(agamaComboBox.Text) & "','" & PekerjaanTextBox.Text & "',?, '" & CDate(Format(Now, "dd/MM/yyyy")) & "','" & CDate(Format(Now, "dd/MM/yyyy")) & "', 'aktif');" cmdInsert.CommandType = CommandType.Text cmdInsert.Connection = con cmdInsert.ExecuteNonQuery() con.Close() End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Call Koneksi() Ds = New DataSet Tabel = "SELECT * FROM anggota" Grid = New OleDb.OleDbDataAdapter(Tabel, Database) Grid.Fill(Ds, "anggota") Dim GridView As New DataView(Ds.Tables("anggota")) DataGridView2.DataSource = GridView End Sub Private Sub PictureBox1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click End Sub
Private Sub browseButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles browseButton.Click FotoOpenFileDialog.Filter = "Jpeg|*.JPG|Bitmap|
- .BMP|Gif|*.Gif" FotoOpenFileDialog.RestoreDirectory = True FotoOpenFileDialog.ShowDialog() If FotoOpenFileDialog.FileName = "" Then Exit Sub PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage PictureBox1.ImageLocation = FotoOpenFileDialog.FileName photoForm.PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage photoForm.PictureBox1.ImageLocation = FotoOpenFileDialog.FileName
If FileName.PostedFile Is Nothing Then Label1.Text = "tidak ada!" Else Try Dim strExt As String = Path.GetExtension(Me.FileName.PostedFile.FileName) If strExt.ToLower() = ".gif" Or strExt.ToLower() = ".jpg" Or strExt.ToLower() = ".png" Or strExt.ToLower() = ".jpeg" Then Dim savedFile As String savedFile
= Path.GetFileName(Me.FileName.PostedFile.FileName) FileName.PostedFile.SaveAs("C:\Uploads\" & savedFile) Label1.Text = "berhasil" Else Label1.Text = "Only Image Files are Allowed" End If Catch exp As Exception Label1.Text = exp.Message End Try End If End Sub Private Sub deleteButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles deleteButton.Click PictureBox1.Image = Nothing photoForm.PictureBox1.Image = Nothing End Sub Private Sub refreshdata() If Not cnnOLEDB.State = ConnectionState.Open Then cnnOLEDB.Open() End If Dim da As New OleDb.OleDbDataAdapter("select * from anggota", cnnOLEDB) Dim dt As New DataTable Me.DGanggota.DataSource = dt End Sub Private Sub Button1_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cmd As OleDb.OleDbCommand If Not cnnOLEDB.State = ConnectionState.Open Then cnnOLEDB.Open() End If cmd.Connection = cnnOLEDB cmd.CommandText = "insert into anggota values('','" & NamaTextBox.Text & "','" & AlamatTextBox.Text & "','" & Val(kotaComboBox.Text) & "','" & Tgl_lahirDateTimePicker.Value & "','" & Val(genderComboBox.Text) & "','" & No_hpTextBox.Text & "','" & Val(agamaComboBox.Text) & "','" & PekerjaanTextBox.Text & "',?, '" & CDate(Format(Now, "dd/MM/yyyy")) & "','" & CDate(Format(Now, "dd/MM/yyyy")) & "', 'aktif')" cmd.ExecuteNonQuery() refreshdata() cnnOLEDB.Close() End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub Private Sub DGanggota_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGanggota.CellContentClick End Sub End Class
LAMPIRAN B
SURAT BALASAN PENELITIAN
LAMPIRAN C
DAFTAR KEHADIRAN KERJA PRAKTEK
LAMPIRAN C
DAFTAR KEHADIRAN KERJA PRAKTEK
LAMPIRAN C
DAFTAR KEHADIRAN KERJA PRAKTEK