Sistem Pendukung Keputusan Penentuan Warga Miskin Dengan Metode Simple Additive Weighting (SAW) dan Profile Matching
LAMPIRAN LISTING PROGRAM Login
Public Class FormLogin Private Sub btnMasuk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMasuk.Click If _isBOF2("Select count(name) from Data_user where name='" & Me.txtUser.Text & "' and Password='" & Me.txtPass.Text & "'") = True Then MsgBox("Login Salah") txtUser.Text = "" txtPass.Text = "" txtUser.Focus() Else FormUtama.Show() Me.Hide() End If End Sub Private Sub btnBatal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBatal.Click End End Sub End Class
Data Admin
Public Class DataAdmin Sub bersih() txtIDAdmin.Text = "" txtName.Text = "" txtPassword.Text = "" txtIDAdmin.Focus() End Sub Sub aktifButton() btnTambah.Enabled = True btnUbah.Enabled = True btnHapus.Enabled = True btnKeluar.Enabled = True End Sub
Private Sub awal() koneksi._BindingView("Select * from Data_user", Me.DataGridViewUser) _TxtNull(Me) End Sub Private Sub DataUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load awal() aktifButton() End Sub Private Sub DataGridViewUser_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridViewUser.CellClick On Error Resume Next Me.txtIDAdmin.Text = DataGridViewUser.Rows(e.RowIndex).Cells(0).Value Me.txtName.Text = DataGridViewUser.Rows(e.RowIndex).Cells(1).Value Me.txtPassword.Text = DataGridViewUser.Rows(e.RowIndex).Cells(2).Value btnTambah.Visible = True End Sub Private Sub btnTambah_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTambah.Click koneksi._RunSQL("Insert into Data_user values ('" & Me.txtIDAdmin.Text & "','" & Me.txtName.Text & "','" & Me.txtPassword.Text & "')") MsgBox("Data User Berhasil Ditambahkan", MsgBoxStyle.Information, "Perhatian") awal() End Sub Private Sub btnUbah_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUbah.Click koneksi._RunSQL("Update Data_user set name='" & Me.txtName.Text & "', Pass = '" & Me.txtPassword.Text & "' Where id='" & Me.txtIDAdmin.Text & "'") MsgBox("Data User Berhasil Diubah", MsgBoxStyle.Information, "Perhatian") awal() End Sub Private Sub btnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHapus.Click If Me.txtName.Text <> vbNullString Then _RunSQL("Delete from Data_user Where id='" & Me.txtIDAdmin.Text & "'") MsgBox("Data User Berhasil Dihapus", MsgBoxStyle.Information, "Perhatian") awal() bersih() aktifButton() End If End Sub Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKeluar.Click Me.Close() End Sub End Clas
Data Warga
Public Class DataWarga Sub bersih() txtno.Text = "" txtNama.Text = "" cmbDusun.Text = "" txtUmur.Text = "" txtLuas.Text = "" cmbStsTanah.Text = "" cmbStsRumah.Text = "" cmbKondisi.Text = "" txtPendapatan.Text = "" cmbPendidikan.Text = "" txtListrik.text = "" txtAnak.Text = "" txtno.Focus() End Sub Sub aktifButton() btnTambah.Enabled = True btnUbah.Enabled = True btnHapus.Enabled = True btnKeluar.Enabled = True End Sub Private Sub awal() koneksi._BindingView("Select * from Data_warga", Me.DataGridViewWarga) _TxtNull(Me) End Sub Private Sub DataUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load awal() aktifButton() End Sub Private Sub DataGridViewWarga_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridViewWarga.CellClick On Error Resume Next Me.txtno.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(0).Value Me.txtNama.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(1).Value Me.cmbDusun.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(2).Value Me.txtUmur.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(3).Value Me.txtLuas.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(4).Value Me.cmbStsTanah.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(5).Value Me.cmbStsRumah.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(6).Value Me.cmbKondisi.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(7).Value Me.txtPendapatan.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(8).Value Me.cmbPendidikan.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(9).Value Me.txtListrik.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(10).Value Me.txtAnak.Text = DataGridViewWarga.Rows(e.RowIndex).Cells(11).Value btnTambah.Visible = True
End Sub Private Sub btnTambah_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTambah.Click koneksi._RunSQL("Insert into Data_warga values ( '" & Me.txtno.Text & _ "', '" & Me.txtNama.Text & _ "', '" & Me.cmbDusun.Text & _ "', '" & Me.txtUmur.Text & _ "', '" & Me.txtLuas.Text & _ "', '" & Me.cmbStsTanah.Text & _ "', '" & Me.cmbStsRumah.Text & _ "', '" & Me.cmbKondisi.Text & _ "', '" & Me.txtPendapatan.Text & _ "', '" & Me.cmbPendidikan.Text & _ "', '" & Me.txtListrik.Text & _ "', '" & Me.txtAnak.Text & "') ") MsgBox("Data Warga Berhasil Ditambahkan", MsgBoxStyle.Information, "Perhatian") awal() End Sub Private Sub btnUbah_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUbah.Click koneksi._RunSQL("Update Data_warga set Nama = '" & Me.txtNama.Text & _ "', Dusun = '" & Me.cmbDusun.Text & _ "', Umur = '" & Me.txtUmur.Text & _ "', Luas_Bangunan = '" & Me.txtLuas.Text & _ "', Status_Tanah = '" & Me.cmbStsTanah.Text & _ "', Status_Rumah = '" & Me.cmbStsRumah.Text & _ "', Kondisi_Rumah = '" & Me.cmbKondisi.Text & _ "', Pendapatan = '" & Me.txtPendapatan.Text & _ "', Pendidikan = '" & Me.cmbPendidikan.Text & _ "', Listrik = '" & Me.txtListrik.Text & _ "', Tanggungan_Anak = '" & Me.txtAnak.Text & _ "' where No_Warga = '" & Me.txtno.Text & "'") MsgBox("Data Warga Berhasil Diubah", MsgBoxStyle.Information, "Perhatian") awal() End Sub Private Sub btnHapus_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHapus.Click If Me.txtno.Text <> vbNullString Then _RunSQL("Delete from Data_warga Where No_Warga = '" & Me.txtno.Text & "'") MsgBox("Data Warga Berhasil Dihapus", MsgBoxStyle.Information, "Perhatian") awal() bersih() aktifButton() End If 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
Metode SAW
Imports System.Data Imports System.Data.OleDb Public Class SAW Private Sub awal() koneksi._BindingView("Select * from Data_warga", Me.DGWargaSAW) _TxtNull(Me) End Sub Private Sub SAW_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load awal() Call bobot() End Sub Private Sub bobot() With DataGridViewBobot .ColumnCount = 2 .Columns(0).Name = "Kriteria" .Columns(1).Name = "Bobot" End With With DataGridViewBobot Dim row1 As String() = New String() {"Luas Rumah"} Dim row2 As String() = New String() {"Status Rumah"} Dim row3 As String() = New String() {"Status Tanah"} Dim row4 As String() = New String() {"Kondisi Rumah"} Dim row5 As String() = New String() {"Pendapatan"} Dim row6 As String() = New String() {"Pendidikan"} Dim row7 As String() = New String() {"Listrik"} Dim row8 As String() = New String() {"Anak"} .Rows.Add(row1) .Rows.Add(row2) .Rows.Add(row3) .Rows.Add(row4) .Rows.Add(row5) .Rows.Add(row6) .Rows.Add(row7) .Rows.Add(row8) End With With DataGridViewBobot DataGridViewBobot.Item(1, 0).Value = 2 DataGridViewBobot.Item(1, 1).Value = 2 DataGridViewBobot.Item(1, 2).Value = 2 DataGridViewBobot.Item(1, 3).Value = 3 DataGridViewBobot.Item(1, 4).Value = 1 DataGridViewBobot.Item(1, 5).Value = 2 DataGridViewBobot.Item(1, 6).Value = 1
DataGridViewBobot.Item(1, 7).Value = 2 End With End Sub Public JlhBaris As Integer Private Sub Proses() With DGNormalisasi .ColumnCount = 9 .Columns(0).Name = "No Warga" .Columns(1).Name = "Luas Rumah" .Columns(2).Name = "Status Tanah" .Columns(3).Name = "Status Rumah" .Columns(4).Name = "Kondisi Rumah" .Columns(5).Name = "Pendapatan" .Columns(6).Name = "Pendidikan" .Columns(7).Name = "Listrik" .Columns(8).Name = "Tanggungan Anak" .Columns(0).Width = 55 .Columns(1).Width = 59 .Columns(2).Width = 57 .Columns(3).Width = 59 .Columns(4).Width = 60 .Columns(5).Width = 89 .Columns(6).Width = 84 .Columns(7).Width = 55 .Columns(8).Width = 93 End With JlhBaris = DGWargaSAW.Rows.Count With DGNormalisasi For i = 0 To JlhBaris - 2 .Rows.Add(DGWargaSAW.Item(0, i).Value()) Next End With With DGNormalisasi For i = 0 To JlhBaris - 2 If (DGWargaSAW.Item(4, i).Value() > 30) And (DGWargaSAW.Item(4, i).Value <= 50) Then DGNormalisasi.Item(1, i).Value() = 1 End If If (DGWargaSAW.Item(4, i).Value() > 51) And (DGWargaSAW.Item(4, i).Value <= 70) Then DGNormalisasi.Item(1, i).Value() = 2 End If If (DGWargaSAW.Item(4, i).Value() > 70) And (DGWargaSAW.Item(4, i).Value <= 90) Then DGNormalisasi.Item(1, i).Value() = 3 End If If (DGWargaSAW.Item(4, i).Value() > 90) And (DGWargaSAW.Item(4, i).Value <= 110) Then DGNormalisasi.Item(1, i).Value() = 4 End If If (DGWargaSAW.Item(5, i).Value = "numpang") Then DGNormalisasi.Item(2, i).Value() = 1
End If If (DGWargaSAW.Item(5, i).Value = "sewa") Then DGNormalisasi.Item(2, i).Value() = 2 End If If (DGWargaSAW.Item(5, i).Value = "milik sendiri") Then DGNormalisasi.Item(2, i).Value() = 3 End If If (DGWargaSAW.Item(6, i).Value = "numpang") Then DGNormalisasi.Item(3, i).Value() = 1 End If If (DGWargaSAW.Item(6, i).Value = "sewa") Then DGNormalisasi.Item(3, i).Value() = 2 End If If (DGWargaSAW.Item(6, i).Value = "milik sendiri") Then DGNormalisasi.Item(3, i).Value() = 3 End If If (DGWargaSAW.Item(7, i).Value = "lantai tanah dinding bambu atau papan") Then DGNormalisasi.Item(4, i).Value() = 1 End If If (DGWargaSAW.Item(7, i).Value = "lantai semen dinding bambu") Then DGNormalisasi.Item(4, i).Value() = 2 End If If (DGWargaSAW.Item(7, i).Value = "lantai semen dinding papan") Then DGNormalisasi.Item(4, i).Value() = 3 End If If (DGWargaSAW.Item(7, i).Value = "lantai semen dinding batu") Then DGNormalisasi.Item(4, i).Value() = 4 End If If DGWargaSAW.Item(8, i).Value() >= 0 And DGWargaSAW.Item(8, i).Value <= 10 Then DGNormalisasi.Item(5, i).Value() = 1 End If If DGWargaSAW.Item(8, i).Value() >= 11 And DGWargaSAW.Item(8, i).Value <= 15 Then DGNormalisasi.Item(5, i).Value() = 2 End If If DGWargaSAW.Item(8, i).Value() > 15 And DGWargaSAW.Item(8, i).Value <= 20 Then DGNormalisasi.Item(5, i).Value() = 3 End If If DGWargaSAW.Item(8, i).Value() > 20 And DGWargaSAW.Item(8, i).Value <= 25 Then DGNormalisasi.Item(5, i).Value() = 4 End If If (DGWargaSAW.Item(9, i).Value = "tidak sekolah") Then DGNormalisasi.Item(6, i).Value() = 1 End If If (DGWargaSAW.Item(9, i).Value = "SD") Then DGNormalisasi.Item(6, i).Value() = 2 End If If (DGWargaSAW.Item(9, i).Value = "SLTP") Then DGNormalisasi.Item(6, i).Value() = 3
End If If (DGWargaSAW.Item(9, i).Value = "SLTA") Then DGNormalisasi.Item(6, i).Value() = 4 End If If (DGWargaSAW.Item(10, i).Value = "0") Then DGNormalisasi.Item(7, i).Value() = 1 End If If DGWargaSAW.Item(10, i).Value() > 0 And (DGWargaSAW.Item(10, i).Value <= 10) Then DGNormalisasi.Item(7, i).Value() = 1 End If If DGWargaSAW.Item(10, i).Value() >= 11 And (DGWargaSAW.Item(10, i).Value <= 15) Then DGNormalisasi.Item(7, i).Value() = 2 End If If DGWargaSAW.Item(10, i).Value() > 15 And (DGWargaSAW.Item(10, i).Value <= 20) Then DGNormalisasi.Item(7, i).Value() = 3 End If If DGWargaSAW.Item(10, i).Value() > 20 And (DGWargaSAW.Item(10, i).Value <= 25) Then DGNormalisasi.Item(7, i).Value() = 4 End If If DGWargaSAW.Item(11, i).Value() >= 0 And (DGWargaSAW.Item(11, i).Value <= 1) Then DGNormalisasi.Item(8, i).Value() = 4 End If If DGWargaSAW.Item(11, i).Value() >= 2 And (DGWargaSAW.Item(11, i).Value <= 3) Then DGNormalisasi.Item(8, i).Value() = 3 End If If DGWargaSAW.Item(11, i).Value() > 3 And (DGWargaSAW.Item(11, i).Value <= 5) Then DGNormalisasi.Item(8, i).Value() = 2 End If If DGWargaSAW.Item(11, i).Value() > 5 And (DGWargaSAW.Item(11, i).Value <= 7) Then DGNormalisasi.Item(8, i).Value() = 1 End If Next End With With DGNormalisasi2 .ColumnCount = 9 .Columns(0).Name = "No Warga" .Columns(1).Name = "Luas Rumah" .Columns(2).Name = "Status Tanah" .Columns(3).Name = "Status Rumah" .Columns(4).Name = "Kondisi Rumah" .Columns(5).Name = "Pendapatan" .Columns(6).Name = "Pendidikan" .Columns(7).Name = "Listrik" .Columns(8).Name = "Tanggungan Anak" .Columns(0).Width = 55
.Columns(1).Width = 59 .Columns(2).Width = 57 .Columns(3).Width = 59 .Columns(4).Width = 60 .Columns(5).Width = 89 .Columns(6).Width = 84 .Columns(7).Width = 55 .Columns(8).Width = 93 End With With DGNormalisasi2 For i = 0 To JlhBaris - 1 .Rows.Add(DGNormalisasi.Item(0, i).Value()) Next End With With DGNormalisasi Dim Luas As New ArrayList Dim StTanah As New ArrayList Dim StRumah As New ArrayList Dim Kondisi As New ArrayList Dim Pendapatan As New ArrayList Dim Pendidikan As New ArrayList Dim Listrik As New ArrayList Dim Anak As New ArrayList Dim minLuas As Double Dim minStTanah As Double Dim minStRumah As Double Dim minKondisi As Double Dim minPendapatan As Double Dim minPendidikan As Double Dim minListrik As Double Dim minAnak As Double For i = 0 To JlhBaris - 2 Luas.Add(DGNormalisasi.Item(1, i).Value()) StTanah.Add(DGNormalisasi.Item(2, i).Value()) StRumah.Add(DGNormalisasi.Item(3, i).Value()) Kondisi.Add(DGNormalisasi.Item(4, i).Value()) Pendapatan.Add(DGNormalisasi.Item(5, i).Value()) Pendidikan.Add(DGNormalisasi.Item(6, i).Value()) Listrik.Add(DGNormalisasi.Item(7, i).Value()) Anak.Add(DGNormalisasi.Item(8, i).Value()) Next minLuas = NilaiMin(Luas) minStTanah = NilaiMin(StTanah) minStRumah = NilaiMin(StRumah) minKondisi = NilaiMin(Kondisi) minPendapatan = NilaiMin(Pendapatan) minPendidikan = NilaiMin(Pendidikan) minListrik = NilaiMin(Listrik) minAnak = NilaiMin(Anak) For i = 0 To JlhBaris - 2 DGNormalisasi2.Item(1, i).Value() = FormatNumber(minLuas / Val(DGNormalisasi.Item(1, i).Value()), 3)
DGNormalisasi2.Item(2, i).Value() = FormatNumber(minStTanah / Val(DGNormalisasi.Item(2, i).Value()), 3) DGNormalisasi2.Item(3, i).Value() = FormatNumber(minStRumah / Val(DGNormalisasi.Item(3, i).Value()), 3) DGNormalisasi2.Item(4, i).Value() = FormatNumber(minKondisi / Val(DGNormalisasi.Item(4, i).Value()), 3) DGNormalisasi2.Item(5, i).Value() = FormatNumber(minPendapatan / Val(DGNormalisasi.Item(5, i).Value()), 3) DGNormalisasi2.Item(6, i).Value() = FormatNumber(minPendidikan / Val(DGNormalisasi.Item(6, i).Value()), 3) DGNormalisasi2.Item(7, i).Value() = FormatNumber(minListrik / Val(DGNormalisasi.Item(7, i).Value()), 3) DGNormalisasi2.Item(8, i).Value() = FormatNumber(minAnak / Val(DGNormalisasi.Item(8, i).Value()), 3) Next End With End Sub Public Function NilaiMin(ByVal itemList As ArrayList) Dim min As Double = Nothing For i As Integer = 0 To (itemList.Count - 1) If i = 0 Then min = itemList(i) Else If itemList(i) < min Then min = itemList(i) End If Next NilaiMin = min End Function Private Sub tampilHasilSAW() With DGHasilSAW .ColumnCount = 5 .Columns(0).Name = "No Warga" .Columns(1).Name = "Nama" .Columns(2).Name = "Dusun" .Columns(3).Name = "Umur" .Columns(4).Name = "Nilai" .Columns(0).Width = 70 .Columns(1).Width = 237 .Columns(2).Width = 60 .Columns(3).Width = 60 .Columns(4).Width = 60 End With Dim jlhBaris = DGWargaSAW.Rows.Count With DGHasilSAW For i = 0 To jlhBaris - 1
.Rows.Add(DGWargaSAW.Item(0, i).Value()) Next End With With DGHasilSAW For i = 0 To jlhBaris - 1 DGHasilSAW.Item(1, i).Value = DGWargaSAW.Item(1, i).Value() DGHasilSAW.Item(2, i).Value = DGWargaSAW.Item(2, i).Value() DGHasilSAW.Item(3, i).Value = DGWargaSAW.Item(3, i).Value() Next End With Dim baris = DataGridViewBobot.Rows.Count Dim kolom = DGNormalisasi2.Columns.Count Dim hasil = DGNormalisasi2.Rows.Count Dim kol(1, 8) As String Dim hsl(hasil) As String With DGHasilSAW For i = 0 To baris - 2 kol(1, i) = DataGridViewBobot.Item(1, i).Value() Next For i = 0 To hasil - 3 hsl(i) = 0 For j = 1 To kolom - 1 hsl(i) += (kol(1, (j - 1)) * DGNormalisasi2.Item(j, i).Value()) Next Next With DGHasilSAW For i = 0 To hasil - 3 DGHasilSAW.Item(4, i).Value() = FormatNumber((hsl(i)), 2) Next End With End With End Sub Private Sub btnHasilSAW_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHasilSAW.Click Dim oWatch As New Stopwatch oWatch.Start() Proses() tampilHasilSAW() DGHasilSAW.Sort(DGHasilSAW.Columns(4), System.ComponentModel.ListSortDirection.Descending) oWatch.Stop() labelWaktu.Text = "" & oWatch.ElapsedMilliseconds.ToString & "ms" 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
Metode Profile Matching
Imports System.Data.OleDb Imports System.Data.OleDb.OleDbCommand Public Class PM Public JlhBaris As Integer Private Sub awal() koneksi._BindingView("Select * from Data_warga", Me.DGWargaPM) _TxtNull(Me) End Sub Private Sub PM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load awal() Call bobot() End Sub Private Sub bobot() With DataGridViewBobot .ColumnCount = 2 .Columns(0).Name = "Kriteria" .Columns(1).Name = "Bobot" End With With DataGridViewBobot Dim row1 As String() = New String() {"Luas Rumah"} Dim row2 As String() = New String() {"Status Rumah"} Dim row3 As String() = New String() {"Status Tanah"} Dim row4 As String() = New String() {"Kondisi Rumah"} Dim row5 As String() = New String() {"Pendapatan"} Dim row6 As String() = New String() {"Pendidikan"} Dim row7 As String() = New String() {"Listrik"} Dim row8 As String() = New String() {"Anak"} .Rows.Add(row1) .Rows.Add(row2) .Rows.Add(row3) .Rows.Add(row4) .Rows.Add(row5) .Rows.Add(row6) .Rows.Add(row7) .Rows.Add(row8) End With With DataGridViewBobot DataGridViewBobot.Item(1, 0).Value = 2 DataGridViewBobot.Item(1, 1).Value = 2
DataGridViewBobot.Item(1, 2).Value = 2 DataGridViewBobot.Item(1, 3).Value = 3 DataGridViewBobot.Item(1, 4).Value = 1 DataGridViewBobot.Item(1, 5).Value = 2 DataGridViewBobot.Item(1, 6).Value = 1 DataGridViewBobot.Item(1, 7).Value = 2 End With End Sub Private Sub UbahNilai() With DGNormalisasiPM .ColumnCount = 9 .Columns(0).Name = "No Warga" .Columns(1).Name = "Luas Rumah" .Columns(2).Name = "Status Tanah" .Columns(3).Name = "Status Rumah" .Columns(4).Name = "Kondisi Rumah" .Columns(5).Name = "Pendapatan" .Columns(6).Name = "Pendidikan" .Columns(7).Name = "Listrik" .Columns(8).Name = "Tanggungan Anak" .Columns(0).Width = 55 .Columns(1).Width = 55 .Columns(2).Width = 55 .Columns(3).Width = 55 .Columns(4).Width = 55 .Columns(5).Width = 70 .Columns(6).Width = 70 .Columns(7).Width = 55 .Columns(8).Width = 85 End With JlhBaris = DGWargaPM.Rows.Count With DGNormalisasiPM For i = 0 To JlhBaris - 2 .Rows.Add(DGWargaPM.Item(0, i).Value()) Next End With With DGNormalisasiPM For i = 0 To JlhBaris - 2 If (DGWargaPM.Item(4, i).Value() > 30) And (DGWargaPM.Item(4, i).Value <= 50) Then DGNormalisasiPM.Item(1, i).Value() = 1 End If If (DGWargaPM.Item(4, i).Value() > 51) And (DGWargaPM.Item(4, i).Value <= 70) Then DGNormalisasiPM.Item(1, i).Value() = 2 End If If (DGWargaPM.Item(4, i).Value() > 70) And (DGWargaPM.Item(4, i).Value <= 90) Then DGNormalisasiPM.Item(1, i).Value() = 3 End If
If (DGWargaPM.Item(4, i).Value() > 90) And (DGWargaPM.Item(4, i).Value <= 110) Then DGNormalisasiPM.Item(1, i).Value() = 4 End If If (DGWargaPM.Item(5, i).Value = "numpang") Then DGNormalisasiPM.Item(2, i).Value() = 1 End If If (DGWargaPM.Item(5, i).Value = "sewa") Then DGNormalisasiPM.Item(2, i).Value() = 2 End If If (DGWargaPM.Item(5, i).Value = "milik sendiri") Then DGNormalisasiPM.Item(2, i).Value() = 3 End If If (DGWargaPM.Item(6, i).Value = "numpang") Then DGNormalisasiPM.Item(3, i).Value() = 1 End If If (DGWargaPM.Item(6, i).Value = "sewa") Then DGNormalisasiPM.Item(3, i).Value() = 2 End If If (DGWargaPM.Item(6, i).Value = "milik sendiri") Then DGNormalisasiPM.Item(3, i).Value() = 3 End If If (DGWargaPM.Item(7, i).Value = "lantai tanah dinding bambu atau papan") Then DGNormalisasiPM.Item(4, i).Value() = 1 End If If (DGWargaPM.Item(7, i).Value = "lantai semen dinding bambu") Then DGNormalisasiPM.Item(4, i).Value() = 2 End If If (DGWargaPM.Item(7, i).Value = "lantai semen dinding papan") Then DGNormalisasiPM.Item(4, i).Value() = 3 End If If (DGWargaPM.Item(7, i).Value = "lantai semen dinding batu") Then DGNormalisasiPM.Item(4, i).Value() = 4 End If If DGWargaPM.Item(8, i).Value() >= 0 And DGWargaPM.Item(8, i).Value <= 10 Then DGNormalisasiPM.Item(5, i).Value() = 1 End If If DGWargaPM.Item(8, i).Value() >= 11 And DGWargaPM.Item(8, i).Value <= 15 Then DGNormalisasiPM.Item(5, i).Value() = 2 End If If DGWargaPM.Item(8, i).Value() > 15 And DGWargaPM.Item(8, i).Value <= 20 Then DGNormalisasiPM.Item(5, i).Value() = 3 End If If DGWargaPM.Item(8, i).Value() > 20 And DGWargaPM.Item(8, i).Value <= 25 Then DGNormalisasiPM.Item(5, i).Value() = 4 End If If (DGWargaPM.Item(9, i).Value = "tidak sekolah") Then DGNormalisasiPM.Item(6, i).Value() = 1
End If If (DGWargaPM.Item(9, i).Value = "SD") Then DGNormalisasiPM.Item(6, i).Value() = 2 End If If (DGWargaPM.Item(9, i).Value = "SLTP") Then DGNormalisasiPM.Item(6, i).Value() = 3 End If If (DGWargaPM.Item(9, i).Value = "SLTA") Then DGNormalisasiPM.Item(6, i).Value() = 4 End If If (DGWargaPM.Item(10, i).Value = "0") Then DGNormalisasiPM.Item(7, i).Value() = 1 End If If DGWargaPM.Item(10, i).Value() > 0 And (DGWargaPM.Item(10, i).Value <= 10) Then DGNormalisasiPM.Item(7, i).Value() = 1 End If If DGWargaPM.Item(10, i).Value() >= 11 And (DGWargaPM.Item(10, i).Value <= 15) Then DGNormalisasiPM.Item(7, i).Value() = 2 End If If DGWargaPM.Item(10, i).Value() > 15 And (DGWargaPM.Item(10, i).Value <= 20) Then DGNormalisasiPM.Item(7, i).Value() = 3 End If If DGWargaPM.Item(10, i).Value() > 20 And (DGWargaPM.Item(10, i).Value <= 25) Then DGNormalisasiPM.Item(7, i).Value() = 4 End If If DGWargaPM.Item(11, i).Value() >= 0 And (DGWargaPM.Item(11, i).Value <= 1) Then DGNormalisasiPM.Item(8, i).Value() = 4 End If If DGWargaPM.Item(11, i).Value() >= 2 And (DGWargaPM.Item(11, i).Value <= 3) Then DGNormalisasiPM.Item(8, i).Value() = 3 End If If DGWargaPM.Item(11, i).Value() > 3 And (DGWargaPM.Item(11, i).Value <= 5) Then DGNormalisasiPM.Item(8, i).Value() = 2 End If If DGWargaPM.Item(11, i).Value() > 5 And (DGWargaPM.Item(11, i).Value <= 7) Then DGNormalisasiPM.Item(8, i).Value() = 1 End If Next End With End Sub Private Sub Pemetaan() With DGGap .ColumnCount = 9 .Columns(0).Name = "No Warga" .Columns(1).Name = "Luas Rumah" .Columns(2).Name = "Status Tanah" .Columns(3).Name = "Status Rumah" .Columns(4).Name = "Kondisi Rumah"
.Columns(5).Name = "Pendapatan" .Columns(6).Name = "Pendidikan" .Columns(7).Name = "Listrik" .Columns(8).Name = "Tanggungan Anak" .Columns(0).Width = 55 .Columns(1).Width = 55 .Columns(2).Width = 55 .Columns(3).Width = 55 .Columns(4).Width = 55 .Columns(5).Width = 70 .Columns(6).Width = 70 .Columns(7).Width = 55 .Columns(8).Width = 85 End With JlhBaris = DGNormalisasiPM.Rows.Count With DGGap For i = 0 To JlhBaris - 2 .Rows.Add(DGNormalisasiPM.Item(0, i).Value()) 'menampilkan no warga Next End With With DGNormalisasiPM Dim kurangluas As Double Dim kurangtanah As Double Dim kurangrumah As Double Dim kurangkondisi As Double Dim kurangpendapatan As Double Dim kurangpendidikan As Double Dim kuranglistrik As Double Dim kuranganak As Double kurangluas = DataGridViewBobot.Item(1, 0).Value kurangtanah = DataGridViewBobot.Item(1, 1).Value kurangrumah = DataGridViewBobot.Item(1, 2).Value kurangkondisi = DataGridViewBobot.Item(1, 3).Value kurangpendapatan = DataGridViewBobot.Item(1, 4).Value kurangpendidikan = DataGridViewBobot.Item(1, 5).Value kuranglistrik = DataGridViewBobot.Item(1, 6).Value kuranganak = DataGridViewBobot.Item(1, 7).Value For i = 0 To JlhBaris - 2 DGGap.Item(1, i).Value() = FormatNumber((Val(DGNormalisasiPM.Item(1, i).Value()) - kurangluas), 0) DGGap.Item(2, i).Value() = FormatNumber((Val(DGNormalisasiPM.Item(2, i).Value()) - kurangtanah), 0) DGGap.Item(3, i).Value() = FormatNumber((Val(DGNormalisasiPM.Item(3, i).Value()) - kurangrumah), 0) DGGap.Item(4, i).Value() = FormatNumber((Val(DGNormalisasiPM.Item(4, i).Value()) - kurangkondisi), 0)
DGGap.Item(5, i).Value() = FormatNumber((Val(DGNormalisasiPM.Item(5, i).Value()) - kurangpendapatan), 0) DGGap.Item(6, i).Value() = FormatNumber((Val(DGNormalisasiPM.Item(6, i).Value()) - kurangpendidikan), 0) DGGap.Item(7, i).Value() = FormatNumber((Val(DGNormalisasiPM.Item(7, i).Value()) - kuranglistrik), 0) DGGap.Item(8, i).Value() = FormatNumber((Val(DGNormalisasiPM.Item(8, i).Value()) - kuranganak), 0) Next End With End Sub Private Sub Pembobotan() With DGUbahGAP .ColumnCount = 9 .Columns(0).Name = "No Warga" .Columns(1).Name = "Luas Rumah" .Columns(2).Name = "Status Tanah" .Columns(3).Name = "Status Rumah" .Columns(4).Name = "Kondisi Rumah" .Columns(5).Name = "Pendapatan" .Columns(6).Name = "Pendidikan" .Columns(7).Name = "Listrik" .Columns(8).Name = "Tanggungan Anak" .Columns(0).Width = 55 .Columns(1).Width = 55 .Columns(2).Width = 55 .Columns(3).Width = 55 .Columns(4).Width = 55 .Columns(5).Width = 70 .Columns(6).Width = 70 .Columns(7).Width = 55 .Columns(8).Width = 85 End With JlhBaris = DGWargaPM.Rows.Count With DGUbahGAP For i = 0 To JlhBaris - 2 .Rows.Add(DGWargaPM.Item(0, i).Value()) Next End With With DGUbahGAP For i = 0 To JlhBaris - 2 If (DGGap.Item(1, i).Value = "0") Then DGUbahGAP.Item(1, i).Value() = 5 End If If (DGGap.Item(1, i).Value = "1") Then DGUbahGAP.Item(1, i).Value() = 4.5 End If If (DGGap.Item(1, i).Value = "-1") Then DGUbahGAP.Item(1, i).Value() = 4
End If If (DGGap.Item(1, i).Value = "2") Then DGUbahGAP.Item(1, i).Value() = 3.5 End If If (DGGap.Item(1, i).Value = "-2") Then DGUbahGAP.Item(1, i).Value() = 3 End If If (DGGap.Item(1, i).Value = "3") Then DGUbahGAP.Item(1, i).Value() = 2.5 End If If (DGGap.Item(1, i).Value = "-3") Then DGUbahGAP.Item(1, i).Value() = 2 End If If (DGGap.Item(1, i).Value = "4") Then DGUbahGAP.Item(1, i).Value() = 1.5 End If If (DGGap.Item(1, i).Value = "-4") Then DGUbahGAP.Item(1, i).Value() = 1 End If If (DGGap.Item(2, i).Value = "0") Then DGUbahGAP.Item(2, i).Value() = 5 End If If (DGGap.Item(2, i).Value = "1") Then DGUbahGAP.Item(2, i).Value() = 4.5 End If If (DGGap.Item(2, i).Value = "-1") Then DGUbahGAP.Item(2, i).Value() = 4 End If If (DGGap.Item(2, i).Value = "2") Then DGUbahGAP.Item(2, i).Value() = 3.5 End If If (DGGap.Item(2, i).Value = "-2") Then DGUbahGAP.Item(2, i).Value() = 3 End If If (DGGap.Item(2, i).Value = "3") Then DGUbahGAP.Item(2, i).Value() = 2.5 End If If (DGGap.Item(2, i).Value = "-3") Then DGUbahGAP.Item(2, i).Value() = 2 End If If (DGGap.Item(2, i).Value = "4") Then DGUbahGAP.Item(2, i).Value() = 1.5 End If If (DGGap.Item(2, i).Value = "-4") Then DGUbahGAP.Item(2, i).Value() = 1 End If If (DGGap.Item(3, i).Value = "0") Then DGUbahGAP.Item(3, i).Value() = 5 End If If (DGGap.Item(3, i).Value = "1") Then DGUbahGAP.Item(3, i).Value() = 4.5 End If If (DGGap.Item(3, i).Value = "-1") Then DGUbahGAP.Item(3, i).Value() = 4 End If If (DGGap.Item(3, i).Value = "2") Then
DGUbahGAP.Item(3, i).Value() = 3.5 End If If (DGGap.Item(3, i).Value = "-2") Then DGUbahGAP.Item(3, i).Value() = 3 End If If (DGGap.Item(3, i).Value = "3") Then DGUbahGAP.Item(3, i).Value() = 2.5 End If If (DGGap.Item(3, i).Value = "-3") Then DGUbahGAP.Item(3, i).Value() = 2 End If If (DGGap.Item(3, i).Value = "4") Then DGUbahGAP.Item(3, i).Value() = 1.5 End If If (DGGap.Item(3, i).Value = "-4") Then DGUbahGAP.Item(3, i).Value() = 1 End If If (DGGap.Item(4, i).Value = "0") Then DGUbahGAP.Item(4, i).Value() = 5 End If If (DGGap.Item(4, i).Value = "1") Then DGUbahGAP.Item(4, i).Value() = 4.5 End If If (DGGap.Item(4, i).Value = "-1") Then DGUbahGAP.Item(4, i).Value() = 4 End If If (DGGap.Item(4, i).Value = "2") Then DGUbahGAP.Item(4, i).Value() = 3.5 End If If (DGGap.Item(4, i).Value = "-2") Then DGUbahGAP.Item(4, i).Value() = 3 End If If (DGGap.Item(4, i).Value = "3") Then DGUbahGAP.Item(4, i).Value() = 2.5 End If If (DGGap.Item(4, i).Value = "-3") Then DGUbahGAP.Item(4, i).Value() = 2 End If If (DGGap.Item(4, i).Value = "4") Then DGUbahGAP.Item(4, i).Value() = 1.5 End If If (DGGap.Item(4, i).Value = "-4") Then DGUbahGAP.Item(4, i).Value() = 1 End If If (DGGap.Item(5, i).Value = "0") Then DGUbahGAP.Item(5, i).Value() = 5 End If If (DGGap.Item(5, i).Value = "1") Then DGUbahGAP.Item(5, i).Value() = 4.5 End If If (DGGap.Item(5, i).Value = "-1") Then DGUbahGAP.Item(5, i).Value() = 4 End If If (DGGap.Item(5, i).Value = "2") Then DGUbahGAP.Item(5, i).Value() = 3.5 End If
If (DGGap.Item(5, i).Value = "-2") Then DGUbahGAP.Item(5, i).Value() = 3 End If If (DGGap.Item(5, i).Value = "3") Then DGUbahGAP.Item(5, i).Value() = 2.5 End If If (DGGap.Item(5, i).Value = "-3") Then DGUbahGAP.Item(5, i).Value() = 2 End If If (DGGap.Item(5, i).Value = "4") Then DGUbahGAP.Item(5, i).Value() = 1.5 End If If (DGGap.Item(5, i).Value = "-4") Then DGUbahGAP.Item(5, i).Value() = 1 End If If (DGGap.Item(6, i).Value = "0") Then DGUbahGAP.Item(6, i).Value() = 5 End If If (DGGap.Item(6, i).Value = "1") Then DGUbahGAP.Item(6, i).Value() = 4.5 End If If (DGGap.Item(6, i).Value = "-1") Then DGUbahGAP.Item(6, i).Value() = 4 End If If (DGGap.Item(6, i).Value = "2") Then DGUbahGAP.Item(6, i).Value() = 3.5 End If If (DGGap.Item(6, i).Value = "-2") Then DGUbahGAP.Item(6, i).Value() = 3 End If If (DGGap.Item(6, i).Value = "3") Then DGUbahGAP.Item(6, i).Value() = 2.5 End If If (DGGap.Item(6, i).Value = "-3") Then DGUbahGAP.Item(6, i).Value() = 2 End If If (DGGap.Item(6, i).Value = "4") Then DGUbahGAP.Item(6, i).Value() = 1.5 End If If (DGGap.Item(6, i).Value = "-4") Then DGUbahGAP.Item(6, i).Value() = 1 End If If (DGGap.Item(7, i).Value = "0") Then DGUbahGAP.Item(7, i).Value() = 5 End If If (DGGap.Item(7, i).Value = "1") Then DGUbahGAP.Item(7, i).Value() = 4.5 End If If (DGGap.Item(7, i).Value = "-1") Then DGUbahGAP.Item(7, i).Value() = 4 End If If (DGGap.Item(7, i).Value = "2") Then DGUbahGAP.Item(7, i).Value() = 3.5 End If If (DGGap.Item(7, i).Value = "-2") Then DGUbahGAP.Item(7, i).Value() = 3
End If If (DGGap.Item(7, i).Value = "3") Then DGUbahGAP.Item(7, i).Value() = 2.5 End If If (DGGap.Item(7, i).Value = "-3") Then DGUbahGAP.Item(7, i).Value() = 2 End If If (DGGap.Item(7, i).Value = "4") Then DGUbahGAP.Item(7, i).Value() = 1.5 End If If (DGGap.Item(7, i).Value = "-4") Then DGUbahGAP.Item(7, i).Value() = 1 End If If (DGGap.Item(8, i).Value = "0") Then DGUbahGAP.Item(8, i).Value() = 5 End If If (DGGap.Item(8, i).Value = "1") Then DGUbahGAP.Item(8, i).Value() = 4.5 End If If (DGGap.Item(8, i).Value = "-1") Then DGUbahGAP.Item(8, i).Value() = 4 End If If (DGGap.Item(8, i).Value = "2") Then DGUbahGAP.Item(8, i).Value() = 3.5 End If If (DGGap.Item(8, i).Value = "-2") Then DGUbahGAP.Item(8, i).Value() = 3 End If If (DGGap.Item(8, i).Value = "3") Then DGUbahGAP.Item(8, i).Value() = 2.5 End If If (DGGap.Item(8, i).Value = "-3") Then DGUbahGAP.Item(8, i).Value() = 2 End If If (DGGap.Item(8, i).Value = "4") Then DGUbahGAP.Item(8, i).Value() = 1.5 End If If (DGGap.Item(8, i).Value = "-4") Then DGUbahGAP.Item(8, i).Value() = 1 End If Next End With End Sub Private Sub CoreSec() With DGCore .ColumnCount = 2 .Columns(0).Name = "No Warga" .Columns(1).Name = "Nilai Core Factor" .Columns(0).Width = 60 .Columns(1).Width = 100 End With JlhBaris = DGUbahGAP.Rows.Count With DGCore
For i = 0 To JlhBaris - 2 .Rows.Add(DGUbahGAP.Item(0, i).Value()) Next End With With DGUbahGAP For i = 0 To JlhBaris - 2 Next End With With DGUbahGAP Dim core As Double For i = 0 To JlhBaris - 2 core = FormatNumber((Val(DGUbahGAP.Item(5, i).Value())) + (Val(DGUbahGAP.Item(7, i).Value())) + (Val(DGUbahGAP.Item(8, i).Value()))) DGCore.Item(1, i).Value = FormatNumber((core / 2), 1) Next End With With DGSecondary .ColumnCount = 2 .Columns(0).Name = "No Warga" .Columns(1).Name = "Nilai Secondary Factor" .Columns(0).Width = 60 .Columns(1).Width = 140 End With JlhBaris = DGUbahGAP.Rows.Count With DGSecondary For i = 0 To JlhBaris - 2 .Rows.Add(DGUbahGAP.Item(0, i).Value()) Next End With With DGUbahGAP For i = 0 To JlhBaris - 2 Next End With With DGUbahGAP Dim secondary As Double For i = 0 To JlhBaris - 2 secondary = FormatNumber((Val(DGUbahGAP.Item(1, i).Value())) + (Val(DGUbahGAP.Item(2, i).Value())) + (Val(DGUbahGAP.Item(3, i).Value())) + (Val(DGUbahGAP.Item(4, i).Value())) + (Val(DGUbahGAP.Item(6, i).Value()))) DGSecondary.Item(1, i).Value = FormatNumber((secondary / 2), 1) Next End With End Sub Private Sub NilaiTotal() btnTotal.Enabled = False
With DGHasilPM .ColumnCount = 5 .Columns(0).Name = "No Warga" .Columns(1).Name = "Nama" .Columns(2).Name = "Dusun" .Columns(3).Name = "Umur" .Columns(4).Name = "Nilai" .Columns(0).Width = 55 .Columns(1).Width = 179 .Columns(2).Width = 55 .Columns(3).Width = 55 .Columns(4).Width = 55 End With JlhBaris = DGWargaPM.Rows.Count With DGHasilPM For i = 0 To JlhBaris - 2 .Rows.Add(DGWargaPM.Item(0, i).Value()) Next End With With DGHasilPM For i = 0 To JlhBaris - 2 DGHasilPM.Item(1, i).Value = DGWargaPM.Item(1, i).Value() DGHasilPM.Item(2, i).Value = DGWargaPM.Item(2, i).Value() DGHasilPM.Item(3, i).Value = DGWargaPM.Item(3, i).Value() Next End With With DGHasilPM Dim NilaiCore As Double Dim NilaiSec As Double For i = 0 To JlhBaris - 2 NilaiCore = FormatNumber(((Val(DGCore.Item(1, i).Value())) * 0.6)) NilaiSec = FormatNumber(((Val(DGSecondary.Item(1, i).Value()))
- 0.4)) DGHasilPM.Item(4, i).Value = FormatNumber((NilaiCore + NilaiSec), 2) Next End With End Sub Private Sub btnTotal_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTotal.Click Dim oWatch As New Stopwatch oWatch.Start() UbahNilai()
Pemetaan() Pembobotan() CoreSec() NilaiTotal()
DGHasilPM.Sort(DGHasilPM.Columns(4), System.ComponentModel.ListSortDirection.Descending) oWatch.Stop() labelWaktu.Text = "" & oWatch.ElapsedMilliseconds.ToString & "ms" 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
Koneksi
Imports System.Data.OleDb Imports System.Data.OleDb.OleDbCommand Module koneksi Public con As OleDbConnection Public cmd As OleDbCommand Public dtr As OleDbDataReader Dim mydatatable As DataTable Dim adapter As OleDbDataAdapter Private bindingSource1 As New BindingSource() Public Function _TesDB(ByVal src As String) As Boolean con = New OleDbConnection con.ConnectionString = ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Data_warga.accdb") Try con.Open() Return True Catch ex As Exception MsgBox("Terjadi Error : " & ex.Message) Return False Finally con.Close() End Try End Function Public Function OpenDB() As Boolean con = New OleDbConnection con.ConnectionString = ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Data_warga.accdb") Try con.Open() Return True Catch ex As Exception MsgBox("Terjadi Error : " & ex.Message) Return False End Try
End Function Public Sub _TableData(ByVal sql As String, ByVal obj As Object) OpenDB() cmd = New OleDbCommand(sql, con) Try dtr = cmd.ExecuteReader obj = New DataTable obj.Load(dtr) Catch ex As Exception MsgBox("Terjadi Error : " & ex.Message) Finally dtr.Close() con.Close() End Try End Sub Public Function _DataToValue(ByVal sql As String) As String OpenDB() cmd = New OleDbCommand Try Dim p As String p = "" cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = sql dtr = cmd.ExecuteReader If dtr.HasRows Then dtr.Read() p = (dtr.Item(0)) End If Return p.ToString Catch ex As Exception Return ex.Message Finally con.Close() End Try End Function Public Sub _RunSQL(ByVal sql As String) OpenDB() cmd = New OleDbCommand(sql, con) Try cmd.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) Finally con.Close() End Try End Sub
Public Sub _BindingView(ByVal sql As String, ByVal obj As DataGridView) OpenDB() Dim da As New OleDbDataAdapter Dim ds As New DataSet Dim str1 As String = sql da.SelectCommand = New OleDbCommand(sql, con) da.Fill(ds) con.Close() obj.DataSource = ds.Tables(0) End Sub Function _isBOF(ByVal table As String, ByVal field As String, ByVal whereValue As String) As Boolean Dim p As Integer p = _DataToValue("Select count(" & field & ") from " & table & " Where " & field & "='" & whereValue & "'") If p < 1 Then Return True Else Return False End If End Function Function _isBOF2(ByVal sql As String) As Boolean Dim p As Integer p = _DataToValue(sql) If p < 1 Then Return True Else Return False End If End Function Function _CreateNumber(ByVal fieldname As String, ByVal tablename As String, ByVal UniqeFirstChar As String) As String OpenDB() cmd = New OleDbCommand Dim Hitung As String Dim p As String p = "" Try cmd.Connection = con cmd.CommandType = Data.CommandType.Text cmd.CommandText = "Select " & fieldname & " from " & tablename dtr = cmd.ExecuteReader If dtr.HasRows Then dtr.Read() Hitung = Right(dtr.Item(fieldname), 5) + 1 p = UniqeFirstChar & "-" & Right("0000" & Hitung, 5) Else p = UniqeFirstChar & "-" & "00001" End If Return p.ToString Catch ex As Exception Return ex.Message Finally con.Close() End Try Return p End Function Public Sub _TxtNull(ByVal frm As Object) For Each ctrl As Control In frm.Controls If TypeOf ctrl Is TextBox Then CType(ctrl, TextBox).Text = String.Empty End If Next ctrl End Sub End Module
B-1
LAMPIRAN B CURRICULUM VITAE
Nama : Juanita Christie Purba Tempat/Tanggal Lahir : Martebing/16 Agustus 1992 Alamat : Dusun I Desa Martebing Kec. Dolok Masihul Agama : Islam Jenis Kelamin : Perempuan Alamat email : juanita.purba92@gmail.com No. Hp : 082369373929
PENDIDIKAN FORMAL
2013-2015 : S1 Ekstensi Ilmu Komputer Fasilkom-TI USU, Medan 2010-2013 : D3 Teknik Informatika USU, Medan 2007-2010 : SMA N 1 Dolok Masihul 2004-2007 : SMP N 1 Dolok Masihul 1998-2004 : SD N 102062 Bangun Bandar
SEMINAR
2010 : Peserta International Seminar on Mathematic and Its iii Applications Universitas Sumatera Utara. 2012 : Peserta Seminar dan Lokakarya Mobile Application iii and Networking Universitas Sumatera Utara. 2014 : Peserta Seminar Nasional Literasi Informasi 2014 ii