• Tidak ada hasil yang ditemukan

Sistem Pengolahan Data Penduduk Pada Kelurahan Wek I Padang Sidempuan

N/A
N/A
Protected

Academic year: 2019

Membagikan "Sistem Pengolahan Data Penduduk Pada Kelurahan Wek I Padang Sidempuan"

Copied!
80
0
0

Teks penuh

(1)

User

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class FormPengguna

Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _

Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try

If disposing AndAlso components IsNot Nothing Then components.Dispose()

End If Finally

MyBase.Dispose(disposing) End Try

End Sub

'Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor.

<System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent()

Me.Label4 = New System.Windows.Forms.Label Me.Label5 = New System.Windows.Forms.Label Me.TextBox1 = New System.Windows.Forms.TextBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.Label7 = New System.Windows.Forms.Label Me.Label8 = New System.Windows.Forms.Label Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.Button3 = New System.Windows.Forms.Button Me.ListView1 = New System.Windows.Forms.ListView

Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader Me.Button4 = New System.Windows.Forms.Button

Me.SuspendLayout() '

'Label4 '

Me.Label4.AutoSize = True

Me.Label4.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label4.Location = New System.Drawing.Point(38, 22) Me.Label4.Name = "Label4"

Me.Label4.Size = New System.Drawing.Size(70, 13) Me.Label4.TabIndex = 3

(2)

'

'Label5 '

Me.Label5.AutoSize = True

Me.Label5.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label5.Location = New System.Drawing.Point(38, 54) Me.Label5.Name = "Label5"

Me.Label5.Size = New System.Drawing.Size(61, 13) Me.Label5.TabIndex = 4

Me.Label5.Text = "Password" '

'TextBox1 '

Me.TextBox1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.TextBox1.Location = New System.Drawing.Point(146, 19) Me.TextBox1.Name = "TextBox1"

Me.TextBox1.Size = New System.Drawing.Size(150, 21) Me.TextBox1.TabIndex = 6

'

'TextBox2 '

Me.TextBox2.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.TextBox2.Location = New System.Drawing.Point(146, 47) Me.TextBox2.Name = "TextBox2"

Me.TextBox2.Size = New System.Drawing.Size(150, 21) Me.TextBox2.TabIndex = 7

'

'Label7 '

Me.Label7.AutoSize = True

Me.Label7.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label7.Location = New System.Drawing.Point(130, 22) Me.Label7.Name = "Label7"

Me.Label7.Size = New System.Drawing.Size(12, 13) Me.Label7.TabIndex = 9

Me.Label7.Text = ":" '

'Label8 '

Me.Label8.AutoSize = True

Me.Label8.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label8.Location = New System.Drawing.Point(130, 50) Me.Label8.Name = "Label8"

(3)

Me.Label8.TabIndex = 10 Me.Label8.Text = ":" '

'Button1 '

Me.Button1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Button1.Location = New System.Drawing.Point(12, 88) Me.Button1.Name = "Button1"

Me.Button1.Size = New System.Drawing.Size(65, 30) Me.Button1.TabIndex = 12

Me.Button1.Text = "SIMPAN"

Me.Button1.UseVisualStyleBackColor = True '

'Button2 '

Me.Button2.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Button2.Location = New System.Drawing.Point(146, 88) Me.Button2.Name = "Button2"

Me.Button2.Size = New System.Drawing.Size(65, 30) Me.Button2.TabIndex = 13

Me.Button2.Text = "HAPUS"

Me.Button2.UseVisualStyleBackColor = True '

'Button3 '

Me.Button3.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Button3.Location = New System.Drawing.Point(278, 88) Me.Button3.Name = "Button3"

Me.Button3.Size = New System.Drawing.Size(65, 30) Me.Button3.TabIndex = 14

Me.Button3.Text = "KELUAR"

Me.Button3.UseVisualStyleBackColor = True '

'ListView1 '

Me.ListView1.Columns.AddRange(New

System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader3})

Me.ListView1.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.ListView1.FullRowSelect = True Me.ListView1.GridLines = True

Me.ListView1.Location = New System.Drawing.Point(12, 136) Me.ListView1.Name = "ListView1"

Me.ListView1.Size = New System.Drawing.Size(312, 125) Me.ListView1.TabIndex = 46

(4)

Me.ListView1.View = System.Windows.Forms.View.Details '

'ColumnHeader1 '

Me.ColumnHeader1.Text = "No" Me.ColumnHeader1.Width = 30 '

'ColumnHeader2 '

Me.ColumnHeader2.Text = "User Name" Me.ColumnHeader2.Width = 100

'

'ColumnHeader3 '

Me.ColumnHeader3.Text = "Password" Me.ColumnHeader3.Width = 160

'

'Button4 '

Me.Button4.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Button4.Location = New System.Drawing.Point(79, 88) Me.Button4.Name = "Button4"

Me.Button4.Size = New System.Drawing.Size(65, 30) Me.Button4.TabIndex = 47

Me.Button4.Text = "UBAH"

Me.Button4.UseVisualStyleBackColor = True '

'FormPengguna '

Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.ActiveCaption Me.ClientSize = New System.Drawing.Size(356, 271)

Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.ListView1) Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.Label8) Me.Controls.Add(Me.Label7) Me.Controls.Add(Me.TextBox2) Me.Controls.Add(Me.TextBox1) Me.Controls.Add(Me.Label5) Me.Controls.Add(Me.Label4) Me.Name = "FormPengguna" Me.StartPosition =

System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = " DATA PENGGUNA"

(5)

Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents ListView1 As System.Windows.Forms.ListView

Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader3 As System.Windows.Forms.ColumnHeader Friend WithEvents Button4 As System.Windows.Forms.Button

End Class

Imports MySql.Data.MySqlClient Public Class FormPengguna Private Sub SimpanUser() Try

Using koneksi As New MySqlConnection(cn) koneksi.Open()

Using cmd1 = New MySqlCommand("Insert Into TablePengguna Values ('" & TextBox1.Text & "', '" & TextBox2.Text & "' )", koneksi) cmd1.ExecuteNonQuery()

End Using End Using

Catch ex As Exception End Try

End Sub

Private Sub Tampildata() Dim No As Integer = 0 Try

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select * From TablePengguna", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader ListView1.Items.Clear()

Dim ListItem As ListViewItem While Data.Read

No = No + 1

ListItem = New ListViewItem() ListItem = ListView1.Items.Add(No)

ListItem.SubItems.Add(IIf(IsDBNull(Data("UserName")) = True, "-", Data("UserName")))

ListItem.SubItems.Add(IIf(IsDBNull(Data("Password")) = True, "-", Format(Data("Password"), "*****")))

(6)

End Using

Catch ex As Exception MsgBox(ex.Message()) End Try

End Sub

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

Tampildata() End Sub

Private Sub bersih() TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus() End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Try

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select * From TablePengguna Where UserName='" & TextBox1.Text & "'", Koneksi) Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read = True Then

MsgBox("Data Pengguna Sudah Terdaftar Sebelumnya", MsgBoxStyle.Critical, "Warning New User")

bersih()

TextBox1.Focus() Else

SimpanUser() bersih()

MsgBox("Data User Sudah Berhasil Di Simpan", MsgBoxStyle.Information, "Pesan Simpan Jurusan")

TextBox1.Focus() End If

End Using End Using End Using Tampildata() Catch ex As Exception MsgBox(ex.Message()) End Try

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

Dim Msg As DialogResult

Dim Sql As String = "Update tablepENGGUNA Set " & _ "Username='" & TextBox1.Text & "', " & _

"Password='" & TextBox2.Text & "' Where UserName='" & TextBox1.Text & "'"

(7)

MessageBoxIcon.Question, _

MessageBoxDefaultButton.Button2) Try

Using conn As New MySqlConnection(cn) conn.Open()

Using cmd = New MySqlCommand(Sql, conn) If (Msg = DialogResult.Yes) Then Using results = cmd.ExecuteReader End Using

MsgBox("Data Sudah Berhasi DiUbah", MsgBoxStyle.Information, "Pesan Data")

bersih()

TextBox1.Focus() Else

bersih()

TextBox1.Focus() End If

End Using End Using Tampildata()

Catch ex As OleDb.OleDbException MsgBox("Failed : " & ex.Message) End Try

Tampildata() End Sub

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick

Try

TextBox1.Text =

IIf(IsDBNull(ListView1.SelectedItems(0).SubItems(1).Text.ToString) = True, "", ListView1.SelectedItems(0).SubItems(1).Text.ToString)

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select * From TablePengguna WHERE UserName='" &

ListView1.SelectedItems(0).SubItems(1).Text & "'", Koneksi) Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox2.Text = Data("Password") End If

End Using End Using End Using

Catch ex As Exception MsgBox(ex.Message()) End Try

(8)

Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

ListView1.SelectedIndexChanged End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Dim Msg As DialogResult

Dim Sql As String = "Delete From Tablepengguna " & _ "WHERE UserName='" & TextBox1.Text & "'"

Msg = MessageBox.Show("Yakin Menghapus Data User " & _ vbCrLf & "Dengan UserName " & TextBox1.Text & "..??", _ "Konfirmasi Hapus", MessageBoxButtons.YesNo, _

MessageBoxIcon.Question, _

MessageBoxDefaultButton.Button2) Try

Using conn As New MySqlConnection(cn) conn.Open()

Using cmd = New MySqlCommand(Sql, conn) If (Msg = DialogResult.Yes) Then Using results = cmd.ExecuteReader End Using

MsgBox("Data Sudah Berhasi DiHapus", MsgBoxStyle.Information, "Pesan Data")

bersih()

TextBox1.Focus() Else

bersih()

TextBox1.Focus() End If

End Using End Using Tampildata()

Catch ex As OleDb.OleDbException MsgBox("Failed : " & ex.Message) End Try

Tampildata() End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

Close() End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged

End Sub

(9)

End Sub End Class

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class Form2

Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _

Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try

If disposing AndAlso components IsNot Nothing Then components.Dispose()

End If Finally

MyBase.Dispose(disposing) End Try

End Sub

'Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor.

<System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent()

Me.Label1 = New System.Windows.Forms.Label Me.TextBox1 = New System.Windows.Forms.TextBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.Label2 = New System.Windows.Forms.Label Me.TextBox3 = New System.Windows.Forms.TextBox Me.Label3 = New System.Windows.Forms.Label Me.Label4 = New System.Windows.Forms.Label

Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker Me.Label5 = New System.Windows.Forms.Label

Me.ComboBox1 = New System.Windows.Forms.ComboBox Me.TextBox4 = New System.Windows.Forms.TextBox Me.Label6 = New System.Windows.Forms.Label

Me.ComboBox2 = New System.Windows.Forms.ComboBox Me.Label7 = New System.Windows.Forms.Label

Me.ComboBox3 = New System.Windows.Forms.ComboBox Me.Label8 = New System.Windows.Forms.Label

Me.TextBox5 = New System.Windows.Forms.TextBox Me.Label9 = New System.Windows.Forms.Label Me.TextBox6 = New System.Windows.Forms.TextBox Me.Label10 = New System.Windows.Forms.Label

Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker Me.Label11 = New System.Windows.Forms.Label

Me.Button1 = New System.Windows.Forms.Button Me.TextBox7 = New System.Windows.Forms.TextBox

(10)

Me.ComboBox4 = New System.Windows.Forms.ComboBox Me.Label12 = New System.Windows.Forms.Label Me.TextBox8 = New System.Windows.Forms.TextBox Me.Label13 = New System.Windows.Forms.Label Me.SuspendLayout()

'

'Label1 '

Me.Label1.AutoSize = True

Me.Label1.Location = New System.Drawing.Point(12, 18) Me.Label1.Name = "Label1"

Me.Label1.Size = New System.Drawing.Size(28, 13) Me.Label1.TabIndex = 0

Me.Label1.Text = "NIK" '

'TextBox1 '

Me.TextBox1.Location = New System.Drawing.Point(175, 15) Me.TextBox1.Name = "TextBox1"

Me.TextBox1.Size = New System.Drawing.Size(116, 21) Me.TextBox1.TabIndex = 1

'

'TextBox2 '

Me.TextBox2.Location = New System.Drawing.Point(175, 41) Me.TextBox2.Name = "TextBox2"

Me.TextBox2.Size = New System.Drawing.Size(116, 21) Me.TextBox2.TabIndex = 3

'

'Label2 '

Me.Label2.AutoSize = True

Me.Label2.Location = New System.Drawing.Point(12, 44) Me.Label2.Name = "Label2"

Me.Label2.Size = New System.Drawing.Size(40, 13) Me.Label2.TabIndex = 2

Me.Label2.Text = "NAMA" '

'TextBox3 '

Me.TextBox3.Location = New System.Drawing.Point(175, 67) Me.TextBox3.Multiline = True

Me.TextBox3.Name = "TextBox3"

Me.TextBox3.Size = New System.Drawing.Size(171, 20) Me.TextBox3.TabIndex = 5

'

'Label3 '

Me.Label3.AutoSize = True

Me.Label3.Location = New System.Drawing.Point(12, 70) Me.Label3.Name = "Label3"

Me.Label3.Size = New System.Drawing.Size(91, 13) Me.Label3.TabIndex = 4

(11)

'

'Label4 '

Me.Label4.AutoSize = True

Me.Label4.Location = New System.Drawing.Point(12, 96) Me.Label4.Name = "Label4"

Me.Label4.Size = New System.Drawing.Size(72, 13) Me.Label4.TabIndex = 6

Me.Label4.Text = "TGL. LAHIR" '

'DateTimePicker1 '

Me.DateTimePicker1.Format =

System.Windows.Forms.DateTimePickerFormat.[Short]

Me.DateTimePicker1.Location = New System.Drawing.Point(175, 96) Me.DateTimePicker1.Name = "DateTimePicker1"

Me.DateTimePicker1.Size = New System.Drawing.Size(98, 21) Me.DateTimePicker1.TabIndex = 7

'

'Label5 '

Me.Label5.AutoSize = True

Me.Label5.Location = New System.Drawing.Point(12, 125) Me.Label5.Name = "Label5"

Me.Label5.Size = New System.Drawing.Size(95, 13) Me.Label5.TabIndex = 8

Me.Label5.Text = "JENIS KELAMIN" '

'ComboBox1 '

Me.ComboBox1.FormattingEnabled = True

Me.ComboBox1.Items.AddRange(New Object() {"LAKI-LAKI", "PEREMPUAN"})

Me.ComboBox1.Location = New System.Drawing.Point(175, 122) Me.ComboBox1.Name = "ComboBox1"

Me.ComboBox1.Size = New System.Drawing.Size(98, 21) Me.ComboBox1.TabIndex = 9

'

'TextBox4 '

Me.TextBox4.Location = New System.Drawing.Point(175, 149) Me.TextBox4.Multiline = True

Me.TextBox4.Name = "TextBox4"

Me.TextBox4.Size = New System.Drawing.Size(171, 20) Me.TextBox4.TabIndex = 11

'

'Label6 '

Me.Label6.AutoSize = True

Me.Label6.Location = New System.Drawing.Point(12, 152) Me.Label6.Name = "Label6"

Me.Label6.Size = New System.Drawing.Size(53, 13) Me.Label6.TabIndex = 10

(12)

'

'ComboBox2 '

Me.ComboBox2.FormattingEnabled = True

Me.ComboBox2.Items.AddRange(New Object() {"ISLAM", "KATOLIK", "PROTESTAN", "HINDU", "BUDHA"})

Me.ComboBox2.Location = New System.Drawing.Point(175, 202) Me.ComboBox2.Name = "ComboBox2"

Me.ComboBox2.Size = New System.Drawing.Size(98, 21) Me.ComboBox2.TabIndex = 13

'

'Label7 '

Me.Label7.AutoSize = True

Me.Label7.Location = New System.Drawing.Point(12, 205) Me.Label7.Name = "Label7"

Me.Label7.Size = New System.Drawing.Size(49, 13) Me.Label7.TabIndex = 12

Me.Label7.Text = "AGAMA" '

'ComboBox3 '

Me.ComboBox3.FormattingEnabled = True

Me.ComboBox3.Items.AddRange(New Object() {"KAWIN", "BELUM KAWIN"})

Me.ComboBox3.Location = New System.Drawing.Point(175, 229) Me.ComboBox3.Name = "ComboBox3"

Me.ComboBox3.Size = New System.Drawing.Size(98, 21) Me.ComboBox3.TabIndex = 15

'

'Label8 '

Me.Label8.AutoSize = True

Me.Label8.Location = New System.Drawing.Point(12, 232) Me.Label8.Name = "Label8"

Me.Label8.Size = New System.Drawing.Size(135, 13) Me.Label8.TabIndex = 14

Me.Label8.Text = "STATUS PERKAWINAN" '

'TextBox5 '

Me.TextBox5.Location = New System.Drawing.Point(175, 283) Me.TextBox5.Multiline = True

Me.TextBox5.Name = "TextBox5"

Me.TextBox5.Size = New System.Drawing.Size(171, 20) Me.TextBox5.TabIndex = 17

'

'Label9 '

Me.Label9.AutoSize = True

Me.Label9.Location = New System.Drawing.Point(12, 286) Me.Label9.Name = "Label9"

(13)

Me.Label9.Text = "PEKERJAAN" '

'TextBox6 '

Me.TextBox6.Location = New System.Drawing.Point(175, 309) Me.TextBox6.Multiline = True

Me.TextBox6.Name = "TextBox6"

Me.TextBox6.Size = New System.Drawing.Size(171, 20) Me.TextBox6.TabIndex = 19

'

'Label10 '

Me.Label10.AutoSize = True

Me.Label10.Location = New System.Drawing.Point(12, 312) Me.Label10.Name = "Label10"

Me.Label10.Size = New System.Drawing.Size(134, 13) Me.Label10.TabIndex = 18

Me.Label10.Text = "KEWARGA NEGARAAN" '

'DateTimePicker2 '

Me.DateTimePicker2.Format =

System.Windows.Forms.DateTimePickerFormat.[Short]

Me.DateTimePicker2.Location = New System.Drawing.Point(178, 335) Me.DateTimePicker2.Name = "DateTimePicker2"

Me.DateTimePicker2.Size = New System.Drawing.Size(98, 21) Me.DateTimePicker2.TabIndex = 21

'

'Label11 '

Me.Label11.AutoSize = True

Me.Label11.Location = New System.Drawing.Point(12, 341) Me.Label11.Name = "Label11"

Me.Label11.Size = New System.Drawing.Size(111, 13) Me.Label11.TabIndex = 20

Me.Label11.Text = "BERLAKU HINGGA" '

'Button1 '

Me.Button1.Location = New System.Drawing.Point(15, 381) Me.Button1.Name = "Button1"

Me.Button1.Size = New System.Drawing.Size(87, 23) Me.Button1.TabIndex = 22

Me.Button1.Text = "SIMPAN"

Me.Button1.UseVisualStyleBackColor = True '

'TextBox7 '

Me.TextBox7.Location = New System.Drawing.Point(265, 381) Me.TextBox7.Multiline = True

Me.TextBox7.Name = "TextBox7"

Me.TextBox7.Size = New System.Drawing.Size(37, 20) Me.TextBox7.TabIndex = 23

(14)

Me.TextBox7.Visible = False Me.TextBox7.WordWrap = False '

'DateTimePicker3 '

Me.DateTimePicker3.Format =

System.Windows.Forms.DateTimePickerFormat.[Short]

Me.DateTimePicker3.Location = New System.Drawing.Point(234, 358) Me.DateTimePicker3.Name = "DateTimePicker3"

Me.DateTimePicker3.Size = New System.Drawing.Size(17, 21) Me.DateTimePicker3.TabIndex = 24

Me.DateTimePicker3.Visible = False '

'Button2 '

Me.Button2.Location = New System.Drawing.Point(108, 381) Me.Button2.Name = "Button2"

Me.Button2.Size = New System.Drawing.Size(87, 23) Me.Button2.TabIndex = 25

Me.Button2.Text = "HAPUS"

Me.Button2.UseVisualStyleBackColor = True '

'ComboBox4 '

Me.ComboBox4.FormattingEnabled = True

Me.ComboBox4.Items.AddRange(New Object() {"KEPALA KELUARGA", "ISTRI", "ANGGOTA"})

Me.ComboBox4.Location = New System.Drawing.Point(175, 255) Me.ComboBox4.Name = "ComboBox4"

Me.ComboBox4.Size = New System.Drawing.Size(98, 21) Me.ComboBox4.TabIndex = 27

'

'Label12 '

Me.Label12.AutoSize = True

Me.Label12.Location = New System.Drawing.Point(12, 258) Me.Label12.Name = "Label12"

Me.Label12.Size = New System.Drawing.Size(119, 13) Me.Label12.TabIndex = 26

Me.Label12.Text = "STATUS KELUARGA" '

'TextBox8 '

Me.TextBox8.Location = New System.Drawing.Point(175, 175) Me.TextBox8.Name = "TextBox8"

Me.TextBox8.Size = New System.Drawing.Size(146, 21) Me.TextBox8.TabIndex = 28

'

'Label13 '

Me.Label13.AutoSize = True

Me.Label13.Location = New System.Drawing.Point(12, 178) Me.Label13.Name = "Label13"

(15)

Me.Label13.TabIndex = 29 Me.Label13.Text = "KELURAHAN" '

'Form2 '

Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.ActiveCaption Me.ClientSize = New System.Drawing.Size(360, 415)

Me.Controls.Add(Me.Label13) Me.Controls.Add(Me.TextBox8) Me.Controls.Add(Me.ComboBox4) Me.Controls.Add(Me.Label12) Me.Controls.Add(Me.Button2)

Me.Controls.Add(Me.DateTimePicker3) Me.Controls.Add(Me.TextBox7)

Me.Controls.Add(Me.Button1)

Me.Controls.Add(Me.DateTimePicker2) Me.Controls.Add(Me.Label11)

Me.Controls.Add(Me.TextBox6) Me.Controls.Add(Me.Label10) Me.Controls.Add(Me.TextBox5) Me.Controls.Add(Me.Label9) Me.Controls.Add(Me.ComboBox3) Me.Controls.Add(Me.Label8) Me.Controls.Add(Me.ComboBox2) Me.Controls.Add(Me.Label7) Me.Controls.Add(Me.TextBox4) Me.Controls.Add(Me.Label6) Me.Controls.Add(Me.ComboBox1) Me.Controls.Add(Me.Label5)

Me.Controls.Add(Me.DateTimePicker1) Me.Controls.Add(Me.Label4)

Me.Controls.Add(Me.TextBox3) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.TextBox2) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.TextBox1) Me.Controls.Add(Me.Label1)

Me.Font = New System.Drawing.Font("Verdana", 8.25!,

System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.FormBorderStyle =

System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "Form2"

Me.StartPosition =

System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "INPUT DATA PENDUDUK"

Me.ResumeLayout(False) Me.PerformLayout() End Sub

(16)

Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents DateTimePicker1 As

System.Windows.Forms.DateTimePicker

Friend WithEvents Label5 As System.Windows.Forms.Label

Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Label6 As System.Windows.Forms.Label

Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox Friend WithEvents Label7 As System.Windows.Forms.Label

Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox Friend WithEvents Label8 As System.Windows.Forms.Label

Friend WithEvents TextBox5 As System.Windows.Forms.TextBox Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents TextBox6 As System.Windows.Forms.TextBox Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents DateTimePicker2 As

System.Windows.Forms.DateTimePicker

Friend WithEvents Label11 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents TextBox7 As System.Windows.Forms.TextBox Friend WithEvents DateTimePicker3 As

System.Windows.Forms.DateTimePicker

Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents ComboBox4 As System.Windows.Forms.ComboBox Friend WithEvents Label12 As System.Windows.Forms.Label Friend WithEvents TextBox8 As System.Windows.Forms.TextBox Friend WithEvents Label13 As System.Windows.Forms.Label End Class

Imports MySql.Data.MySqlClient

Public Class Form2 Dim sql As String Sub bersih()

TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = ""

DateTimePicker1.Value = Now ComboBox1.Text = ""

TextBox4.Text = "" ComboBox2.Text = "" ComboBox3.Text = "" IDV = 0

TextBox8.Text = "" ComboBox3.Text = "" TextBox5.Text = "" TextBox6.Text = ""

DateTimePicker2.Value = Now End Sub

Sub up()

(17)

Using CMD As New MySqlCommand("UPDATE tblpenduduk SET nik='" & TextBox1.Text & _

"',nama='" & TextBox2.Text & "',tmplahir='" & TextBox3.Text & "',tgllahir='" &

Format(DateTimePicker1.Value, "yyyy-MM-dd ") & _

"',jnskel='" & ComboBox1.Text & "',Alamat='" & TextBox4.Text & "',kel='" & TextBox8.Text & "',agama='" & ComboBox2.Text & _

"',statusper='" &

ComboBox3.Text & "',pekerjaan='" & TextBox5.Text & "',kewarganegaraan='" & TextBox6.Text & "',berlaku='" & Format(DateTimePicker2.Value, "yyyy-MM-dd") & "',statuskel='" & ComboBox4.Text & "' WHERE ID='" & IDV & "'", KN) KN.Open()

CMD.ExecuteNonQuery() End Using

End Using bersih()

frmpen.Tampildata() Me.Close()

End Sub Sub SIMPAN()

Using KN As New MySqlConnection(cn)

Using CMD As New MySqlCommand("INSERT INTO tblpenduduk

(nik,nama,tmplahir,tgllahir,jnskel,Alamat,kel,agama,statusper,pekerjaan,k ewarganegaraan,berlaku,Status,Statuskel,tgl) values('" & TextBox1.Text & _

"','" & TextBox2.Text & "','" & TextBox3.Text & "','" & Format(DateTimePicker1.Value, "yyyy-MM-dd ") & _ "','" & ComboBox1.Text & "','" & TextBox4.Text & "','" & TextBox8.Text & "','" & ComboBox2.Text & _ "','" & ComboBox3.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & _

"','" &

Format(DateTimePicker2.Value, "yyyy-MM-dd") & "','" & TextBox7.Text & _ "','" & ComboBox4.Text & "','" & Format(DateTimePicker3.Value, "yyyy-MM-dd") & "')", KN)

KN.Open()

CMD.ExecuteNonQuery() End Using

End Using bersih()

Sql = "Select * From tblpenduduk" frmpen.Tampildata()

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

If v = True Then SIMPAN() End If

If v = False Then up()

(18)

Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing bersih()

End Sub

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

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Using KN As New MySqlConnection(cn)

Using CMD As New MySqlCommand("DELETE FROM tblpenduduk WHERE ID='" & IDV & "'", KN)

KN.Open()

CMD.ExecuteNonQuery() End Using

End Using bersih()

frmpen.Tampildata() Me.Close()

End Sub

Private Sub Label9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label9.Click

End Sub

Private Sub TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox8.TextChanged

End Sub End Class

Form login

Imports MySql.Data.MySqlClient

Public Class Form2 Dim sql As String Sub bersih()

TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = ""

DateTimePicker1.Value = Now ComboBox1.Text = ""

TextBox4.Text = "" ComboBox2.Text = "" ComboBox3.Text = "" IDV = 0

(19)

ComboBox3.Text = "" TextBox5.Text = "" TextBox6.Text = ""

DateTimePicker2.Value = Now End Sub

Sub up()

Using KN As New MySqlConnection(cn)

Using CMD As New MySqlCommand("UPDATE tblpenduduk SET nik='" & TextBox1.Text & _

"',nama='" & TextBox2.Text & "',tmplahir='" & TextBox3.Text & "',tgllahir='" &

Format(DateTimePicker1.Value, "yyyy-MM-dd ") & _

"',jnskel='" & ComboBox1.Text & "',Alamat='" & TextBox4.Text & "',kel='" & TextBox8.Text & "',agama='" & ComboBox2.Text & _

"',statusper='" &

ComboBox3.Text & "',pekerjaan='" & TextBox5.Text & "',kewarganegaraan='" & TextBox6.Text & "',berlaku='" & Format(DateTimePicker2.Value, "yyyy-MM-dd") & "',statuskel='" & ComboBox4.Text & "' WHERE ID='" & IDV & "'", KN) KN.Open()

CMD.ExecuteNonQuery() End Using

End Using bersih()

frmpen.Tampildata() Me.Close()

End Sub Sub SIMPAN()

Using KN As New MySqlConnection(cn)

Using CMD As New MySqlCommand("INSERT INTO tblpenduduk

(nik,nama,tmplahir,tgllahir,jnskel,Alamat,kel,agama,statusper,pekerjaan,k ewarganegaraan,berlaku,Status,Statuskel,tgl) values('" & TextBox1.Text & _

"','" & TextBox2.Text & "','" & TextBox3.Text & "','" & Format(DateTimePicker1.Value, "yyyy-MM-dd ") & _ "','" & ComboBox1.Text & "','" & TextBox4.Text & "','" & TextBox8.Text & "','" & ComboBox2.Text & _ "','" & ComboBox3.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & _

"','" &

Format(DateTimePicker2.Value, "yyyy-MM-dd") & "','" & TextBox7.Text & _ "','" & ComboBox4.Text & "','" & Format(DateTimePicker3.Value, "yyyy-MM-dd") & "')", KN)

KN.Open()

CMD.ExecuteNonQuery() End Using

End Using bersih()

Sql = "Select * From tblpenduduk" frmpen.Tampildata()

End Sub

(20)

If v = True Then SIMPAN() End If

If v = False Then up()

End If End Sub

Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing bersih()

End Sub

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

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Using KN As New MySqlConnection(cn)

Using CMD As New MySqlCommand("DELETE FROM tblpenduduk WHERE ID='" & IDV & "'", KN)

KN.Open()

CMD.ExecuteNonQuery() End Using

End Using bersih()

frmpen.Tampildata() Me.Close()

End Sub

Private Sub Label9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label9.Click

End Sub

Private Sub TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox8.TextChanged

End Sub End Class

Imports MySql.Data.MySqlClient Public Class FormLogin

Dim s As Integer = 0

Private Sub BtnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnLogin.Click

Try

Using Koneksi As New MySqlConnection(cn)

(21)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

If TextBox2.Text = Trim(Data("Password")) Then

TextBox1.Text = "" TextBox2.Text = "" Me.Hide()

frmmenuutama.Show() Else

MsgBox("Pass Anda Salah", MsgBoxStyle.Critical, "Error")

s = s + 1 If s >= 3 Then Me.Close() End If

TextBox2.Text = "" TextBox2.Focus() TextBox2.Text = "" TextBox2.Focus() End If

Else

MsgBox("User Anda Salah", MsgBoxStyle.Critical, "Error")

s = s + 1 If s >= 3 Then

' MenuUtama.Close() End If

TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus() End If

End Using End Using End Using

Catch ex As Exception

MessageBox.Show(ex.Message) Finally

End Try End Sub

Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown

If e.KeyCode = 13 Then Me.TextBox2.Focus() Else

Me.TextBox1.Focus() Exit Sub

End If End Sub

(22)

If e.KeyCode = 13 Then Me.BtnLogin.Focus() Else

Me.TextBox2.Focus() Exit Sub

End If End Sub

Private Sub FormLogin_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Me.Close() End Sub

End Class

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class FRMDAF

Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _

Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try

If disposing AndAlso components IsNot Nothing Then components.Dispose()

End If Finally

MyBase.Dispose(disposing) End Try

End Sub

'Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor.

<System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent()

Me.TextBox1 = New System.Windows.Forms.TextBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.TextBox3 = New System.Windows.Forms.TextBox Me.TextBox4 = New System.Windows.Forms.TextBox Me.Button1 = New System.Windows.Forms.Button

Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker Me.Label11 = New System.Windows.Forms.Label

(23)

Me.Label3 = New System.Windows.Forms.Label Me.TextBox11 = New System.Windows.Forms.TextBox Me.TextBox14 = New System.Windows.Forms.TextBox Me.TextBox23 = New System.Windows.Forms.TextBox Me.TextBox24 = New System.Windows.Forms.TextBox Me.TextBox25 = New System.Windows.Forms.TextBox Me.TextBox26 = New System.Windows.Forms.TextBox Me.TextBox27 = New System.Windows.Forms.TextBox Me.TextBox36 = New System.Windows.Forms.TextBox Me.TextBox37 = New System.Windows.Forms.TextBox Me.TextBox38 = New System.Windows.Forms.TextBox Me.TextBox39 = New System.Windows.Forms.TextBox Me.TextBox40 = New System.Windows.Forms.TextBox Me.TextBox49 = New System.Windows.Forms.TextBox Me.TextBox50 = New System.Windows.Forms.TextBox Me.TextBox51 = New System.Windows.Forms.TextBox Me.TextBox52 = New System.Windows.Forms.TextBox Me.TextBox53 = New System.Windows.Forms.TextBox Me.TextBox62 = New System.Windows.Forms.TextBox Me.TextBox63 = New System.Windows.Forms.TextBox Me.TextBox64 = New System.Windows.Forms.TextBox Me.TextBox65 = New System.Windows.Forms.TextBox Me.Button2 = New System.Windows.Forms.Button Me.Label4 = New System.Windows.Forms.Label

Me.ComboBox1 = New System.Windows.Forms.ComboBox Me.SuspendLayout()

'

'TextBox1 '

Me.TextBox1.Location = New System.Drawing.Point(12, 127) Me.TextBox1.Name = "TextBox1"

Me.TextBox1.ReadOnly = True

Me.TextBox1.Size = New System.Drawing.Size(150, 20) Me.TextBox1.TabIndex = 0

Me.TextBox1.Text = "Penduduk Awal Bulan ini" '

'TextBox2 '

Me.TextBox2.Location = New System.Drawing.Point(183, 127) Me.TextBox2.Name = "TextBox2"

Me.TextBox2.ReadOnly = True

Me.TextBox2.Size = New System.Drawing.Size(33, 20) Me.TextBox2.TabIndex = 1

Me.TextBox2.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox3 '

Me.TextBox3.Location = New System.Drawing.Point(217, 127) Me.TextBox3.Name = "TextBox3"

Me.TextBox3.ReadOnly = True

(24)

Me.TextBox3.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox4 '

Me.TextBox4.Location = New System.Drawing.Point(251, 127) Me.TextBox4.Name = "TextBox4"

Me.TextBox4.ReadOnly = True

Me.TextBox4.Size = New System.Drawing.Size(33, 20) Me.TextBox4.TabIndex = 3

Me.TextBox4.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'Button1 '

Me.Button1.Location = New System.Drawing.Point(84, 42) Me.Button1.Name = "Button1"

Me.Button1.Size = New System.Drawing.Size(102, 32) Me.Button1.TabIndex = 4

Me.Button1.Text = "Cetak"

Me.Button1.UseVisualStyleBackColor = True '

'DateTimePicker1 '

Me.DateTimePicker1.Format =

System.Windows.Forms.DateTimePickerFormat.[Short]

Me.DateTimePicker1.Location = New System.Drawing.Point(518, 15) Me.DateTimePicker1.Name = "DateTimePicker1"

Me.DateTimePicker1.Size = New System.Drawing.Size(102, 20) Me.DateTimePicker1.TabIndex = 5

'

'Label11 '

Me.Label11.Font = New System.Drawing.Font("Impact", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label11.Location = New System.Drawing.Point(183, 89) Me.Label11.Name = "Label11"

Me.Label11.Size = New System.Drawing.Size(101, 19) Me.Label11.TabIndex = 55

Me.Label11.Text = "WNRI PRIBUMI"

Me.Label11.TextAlign = System.Drawing.ContentAlignment.TopCenter '

'Label1 '

Me.Label1.Font = New System.Drawing.Font("Franklin Gothic Medium Cond", 11.25!, System.Drawing.FontStyle.Regular,

System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label1.Location = New System.Drawing.Point(185, 108) Me.Label1.Name = "Label1"

Me.Label1.Size = New System.Drawing.Size(31, 16) Me.Label1.TabIndex = 56

Me.Label1.Text = "KK"

(25)

'

'Label2 '

Me.Label2.Font = New System.Drawing.Font("Franklin Gothic Medium Cond", 11.25!, System.Drawing.FontStyle.Regular,

System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label2.Location = New System.Drawing.Point(218, 108) Me.Label2.Name = "Label2"

Me.Label2.Size = New System.Drawing.Size(31, 16) Me.Label2.TabIndex = 57

Me.Label2.Text = "LK"

Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter '

'Label3 '

Me.Label3.Font = New System.Drawing.Font("Franklin Gothic Medium Cond", 11.25!, System.Drawing.FontStyle.Regular,

System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.Label3.Location = New System.Drawing.Point(254, 108) Me.Label3.Name = "Label3"

Me.Label3.Size = New System.Drawing.Size(31, 16) Me.Label3.TabIndex = 58

Me.Label3.Text = "PR"

Me.Label3.TextAlign = System.Drawing.ContentAlignment.TopCenter '

'TextBox11 '

Me.TextBox11.Location = New System.Drawing.Point(290, 127) Me.TextBox11.Name = "TextBox11"

Me.TextBox11.ReadOnly = True

Me.TextBox11.Size = New System.Drawing.Size(33, 20) Me.TextBox11.TabIndex = 75

Me.TextBox11.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox14 '

Me.TextBox14.Location = New System.Drawing.Point(290, 153) Me.TextBox14.Name = "TextBox14"

Me.TextBox14.ReadOnly = True

Me.TextBox14.Size = New System.Drawing.Size(33, 20) Me.TextBox14.TabIndex = 92

Me.TextBox14.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox23 '

Me.TextBox23.Location = New System.Drawing.Point(251, 153) Me.TextBox23.Name = "TextBox23"

Me.TextBox23.ReadOnly = True

Me.TextBox23.Size = New System.Drawing.Size(33, 20) Me.TextBox23.TabIndex = 83

Me.TextBox23.TextAlign =

(26)

'

'TextBox24 '

Me.TextBox24.Location = New System.Drawing.Point(217, 153) Me.TextBox24.Name = "TextBox24"

Me.TextBox24.ReadOnly = True

Me.TextBox24.Size = New System.Drawing.Size(33, 20) Me.TextBox24.TabIndex = 82

Me.TextBox24.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox25 '

Me.TextBox25.Location = New System.Drawing.Point(183, 153) Me.TextBox25.Name = "TextBox25"

Me.TextBox25.ReadOnly = True

Me.TextBox25.Size = New System.Drawing.Size(33, 20) Me.TextBox25.TabIndex = 81

Me.TextBox25.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox26 '

Me.TextBox26.Location = New System.Drawing.Point(12, 153) Me.TextBox26.Name = "TextBox26"

Me.TextBox26.ReadOnly = True

Me.TextBox26.Size = New System.Drawing.Size(150, 20) Me.TextBox26.TabIndex = 80

Me.TextBox26.Text = "kELAHIRAN bULAN INI" '

'TextBox27 '

Me.TextBox27.Location = New System.Drawing.Point(290, 179) Me.TextBox27.Name = "TextBox27"

Me.TextBox27.ReadOnly = True

Me.TextBox27.Size = New System.Drawing.Size(33, 20) Me.TextBox27.TabIndex = 105

Me.TextBox27.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox36 '

Me.TextBox36.Location = New System.Drawing.Point(251, 179) Me.TextBox36.Name = "TextBox36"

Me.TextBox36.ReadOnly = True

Me.TextBox36.Size = New System.Drawing.Size(33, 20) Me.TextBox36.TabIndex = 96

Me.TextBox36.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox37 '

(27)

Me.TextBox37.ReadOnly = True

Me.TextBox37.Size = New System.Drawing.Size(33, 20) Me.TextBox37.TabIndex = 95

Me.TextBox37.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox38 '

Me.TextBox38.Location = New System.Drawing.Point(183, 179) Me.TextBox38.Name = "TextBox38"

Me.TextBox38.ReadOnly = True

Me.TextBox38.Size = New System.Drawing.Size(33, 20) Me.TextBox38.TabIndex = 94

Me.TextBox38.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox39 '

Me.TextBox39.Location = New System.Drawing.Point(12, 179) Me.TextBox39.Name = "TextBox39"

Me.TextBox39.ReadOnly = True

Me.TextBox39.Size = New System.Drawing.Size(150, 20) Me.TextBox39.TabIndex = 93

Me.TextBox39.Text = "Kematian Bulan ini" '

'TextBox40 '

Me.TextBox40.Location = New System.Drawing.Point(290, 205) Me.TextBox40.Name = "TextBox40"

Me.TextBox40.ReadOnly = True

Me.TextBox40.Size = New System.Drawing.Size(33, 20) Me.TextBox40.TabIndex = 118

Me.TextBox40.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox49 '

Me.TextBox49.Location = New System.Drawing.Point(251, 205) Me.TextBox49.Name = "TextBox49"

Me.TextBox49.ReadOnly = True

Me.TextBox49.Size = New System.Drawing.Size(33, 20) Me.TextBox49.TabIndex = 109

Me.TextBox49.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox50 '

Me.TextBox50.Location = New System.Drawing.Point(217, 205) Me.TextBox50.Name = "TextBox50"

Me.TextBox50.ReadOnly = True

Me.TextBox50.Size = New System.Drawing.Size(33, 20) Me.TextBox50.TabIndex = 108

Me.TextBox50.TextAlign =

(28)

'

'TextBox51 '

Me.TextBox51.Location = New System.Drawing.Point(183, 205) Me.TextBox51.Name = "TextBox51"

Me.TextBox51.ReadOnly = True

Me.TextBox51.Size = New System.Drawing.Size(33, 20) Me.TextBox51.TabIndex = 107

Me.TextBox51.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox52 '

Me.TextBox52.Location = New System.Drawing.Point(12, 205) Me.TextBox52.Name = "TextBox52"

Me.TextBox52.ReadOnly = True

Me.TextBox52.Size = New System.Drawing.Size(150, 20) Me.TextBox52.TabIndex = 106

Me.TextBox52.Text = "Pendatang Bulan ini" '

'TextBox53 '

Me.TextBox53.Location = New System.Drawing.Point(290, 231) Me.TextBox53.Name = "TextBox53"

Me.TextBox53.ReadOnly = True

Me.TextBox53.Size = New System.Drawing.Size(33, 20) Me.TextBox53.TabIndex = 131

Me.TextBox53.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox62 '

Me.TextBox62.Location = New System.Drawing.Point(251, 231) Me.TextBox62.Name = "TextBox62"

Me.TextBox62.ReadOnly = True

Me.TextBox62.Size = New System.Drawing.Size(33, 20) Me.TextBox62.TabIndex = 122

Me.TextBox62.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox63 '

Me.TextBox63.Location = New System.Drawing.Point(217, 231) Me.TextBox63.Name = "TextBox63"

Me.TextBox63.ReadOnly = True

Me.TextBox63.Size = New System.Drawing.Size(33, 20) Me.TextBox63.TabIndex = 121

Me.TextBox63.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox64 '

(29)

Me.TextBox64.ReadOnly = True

Me.TextBox64.Size = New System.Drawing.Size(33, 20) Me.TextBox64.TabIndex = 120

Me.TextBox64.TextAlign =

System.Windows.Forms.HorizontalAlignment.Center '

'TextBox65 '

Me.TextBox65.Location = New System.Drawing.Point(12, 231) Me.TextBox65.Name = "TextBox65"

Me.TextBox65.ReadOnly = True

Me.TextBox65.Size = New System.Drawing.Size(150, 20) Me.TextBox65.TabIndex = 119

Me.TextBox65.Text = "Pinda" '

'Button2 '

Me.Button2.Location = New System.Drawing.Point(540, 55) Me.Button2.Name = "Button2"

Me.Button2.Size = New System.Drawing.Size(75, 23) Me.Button2.TabIndex = 153

Me.Button2.Text = "Button2"

Me.Button2.UseVisualStyleBackColor = True '

'Label4 '

Me.Label4.AutoSize = True

Me.Label4.Location = New System.Drawing.Point(23, 17) Me.Label4.Name = "Label4"

Me.Label4.Size = New System.Drawing.Size(55, 13) Me.Label4.TabIndex = 154

Me.Label4.Text = "Kelurahan" '

'ComboBox1 '

Me.ComboBox1.FormattingEnabled = True

Me.ComboBox1.Location = New System.Drawing.Point(84, 14) Me.ComboBox1.Name = "ComboBox1"

Me.ComboBox1.Size = New System.Drawing.Size(136, 21) Me.ComboBox1.TabIndex = 155

'

'FRMDAF '

Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.SystemColors.ActiveCaption Me.ClientSize = New System.Drawing.Size(252, 86)

(30)

Me.Controls.Add(Me.TextBox65) Me.Controls.Add(Me.TextBox40) Me.Controls.Add(Me.TextBox49) Me.Controls.Add(Me.TextBox50) Me.Controls.Add(Me.TextBox51) Me.Controls.Add(Me.TextBox52) Me.Controls.Add(Me.TextBox27) Me.Controls.Add(Me.TextBox36) Me.Controls.Add(Me.TextBox37) Me.Controls.Add(Me.TextBox38) Me.Controls.Add(Me.TextBox39) Me.Controls.Add(Me.TextBox14) Me.Controls.Add(Me.TextBox23) Me.Controls.Add(Me.TextBox24) Me.Controls.Add(Me.TextBox25) Me.Controls.Add(Me.TextBox26) Me.Controls.Add(Me.TextBox11) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.Label11)

Me.Controls.Add(Me.DateTimePicker1) Me.Controls.Add(Me.Button1)

Me.Controls.Add(Me.TextBox4) Me.Controls.Add(Me.TextBox3) Me.Controls.Add(Me.TextBox2) Me.Controls.Add(Me.TextBox1) Me.FormBorderStyle =

System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "FRMDAF"

Me.StartPosition =

System.Windows.Forms.FormStartPosition.CenterScreen Me.ResumeLayout(False)

Me.PerformLayout() End Sub

Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents DateTimePicker1 As

System.Windows.Forms.DateTimePicker

(31)

Friend WithEvents TextBox36 As System.Windows.Forms.TextBox Friend WithEvents TextBox37 As System.Windows.Forms.TextBox Friend WithEvents TextBox38 As System.Windows.Forms.TextBox Friend WithEvents TextBox39 As System.Windows.Forms.TextBox Friend WithEvents TextBox40 As System.Windows.Forms.TextBox Friend WithEvents TextBox49 As System.Windows.Forms.TextBox Friend WithEvents TextBox50 As System.Windows.Forms.TextBox Friend WithEvents TextBox51 As System.Windows.Forms.TextBox Friend WithEvents TextBox52 As System.Windows.Forms.TextBox Friend WithEvents TextBox53 As System.Windows.Forms.TextBox Friend WithEvents TextBox62 As System.Windows.Forms.TextBox Friend WithEvents TextBox63 As System.Windows.Forms.TextBox Friend WithEvents TextBox64 As System.Windows.Forms.TextBox Friend WithEvents TextBox65 As System.Windows.Forms.TextBox Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Label4 As System.Windows.Forms.Label

Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox End Class

Imports MySql.Data.MySqlClient Public Class FRMDAF

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'PENDUDUK

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(NIK) AS KK From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and Status='Aktip' and statuskel='KEPALA KELUARGA'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox2.Text = Data("KK") End If

End Using End Using End Using

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(jnskel) AS LK From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and Status='Aktip' and jnskel='LAKI-LAKI'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox3.Text = Data("lk") End If

(32)

End Using End Using

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(jnskel) AS PR From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and Status='Aktip' and jnskel='PEREMPUAN'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox4.Text = Data("PR") End If

End Using End Using End Using

TextBox11.Text = Val(TextBox3.Text) + Val(TextBox4.Text) 'lahir

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("select `tbllahir`.`IDL` AS `IDL`,`tbllahir`.`ID` AS `ID`,`tblpenduduk`.`Kel` AS

`Kel`,count(`tbllahir`.`JK`) AS `JK`,`tbllahir`.`TGLL` AS `TGLL` from (`tbllahir` join `tblpenduduk` on((`tbllahir`.`ID` =

`tblpenduduk`.`ID`))) WHERE `tblpenduduk`.`Kel`= '" & ComboBox1.Text & _ "' and MONTH(`tbllahir`.`TGLL`) = " & Month(Now) & " AND year(`tbllahir`.`TGLL`) = " & Year(Now) & " and `tbllahir`.`JK`='Laki-Laki' ", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox24.Text = Data("jk") End If

End Using End Using End Using

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("select `tbllahir`.`IDL` AS `IDL`,`tbllahir`.`ID` AS `ID`,`tblpenduduk`.`Kel` AS

`Kel`,count(`tbllahir`.`JK`) AS `JK`,`tbllahir`.`TGLL` AS `TGLL` from (`tbllahir` join `tblpenduduk` on((`tbllahir`.`ID` =

(33)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox23.Text = Data("jk") End If

End Using End Using End Using

TextBox14.Text = Val(TextBox24.Text) + Val(TextBox23.Text) 'kematian

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(NIK) AS lk From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and jnskel='Laki-Laki' and status='Meninggal'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox37.Text = Data("lk") End If

End Using End Using End Using

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(NIK) AS PR From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and jnskel='Perempuan' and status='Meninggal'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox36.Text = Data("PR") End If

End Using End Using End Using

TextBox27.Text = Val(TextBox37.Text) + Val(TextBox36.Text) 'pendatang

Using Koneksi As New MySqlConnection(cn)

(34)

Month(Now) & " AND year(TGL) = " & Year(Now) & " and statuskel='KEPALA KELUARGA' and status='Pendatang'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox51.Text = Data("kk") End If

End Using End Using End Using

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(NIK) AS lk From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and jnskel='Laki-Laki' and status='Pendatang'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox50.Text = Data("lk") End If

End Using End Using End Using

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(NIK) AS pr From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and jnskel='Perempuan' and status='Pendatang'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox49.Text = Data("pr") End If

End Using End Using End Using

TextBox40.Text = Val(TextBox50.Text) + Val(TextBox49.Text) 'pindah

Using Koneksi As New MySqlConnection(cn)

(35)

Month(Now) & " AND year(TGL) = " & Year(Now) & " and statuskel='KEPALA KELUARGA' and status='Pindah'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox64.Text = Data("kk") End If

End Using End Using End Using

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(NIK) AS lk From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and jnskel='Laki-Laki' and status='Pindah'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox63.Text = Data("lk") End If

End Using End Using End Using

Using Koneksi As New MySqlConnection(cn)

Using Cmd As New MySqlCommand("Select count(NIK) AS pr From tblpenduduk WHERE kel='" & ComboBox1.Text & "' and MONTH(TGL) = " & Month(Now) & " AND year(TGL) = " & Year(Now) & " and jnskel='Perempuan' and status='Pindah'", Koneksi)

Koneksi.Open()

Using Data As MySqlDataReader = Cmd.ExecuteReader If Data.Read Then

TextBox62.Text = Data("pr") End If

End Using End Using End Using

TextBox53.Text = Val(TextBox62.Text) + Val(TextBox63.Text) Button2_Click(Nothing, Nothing)

End Sub

Referensi

Dokumen terkait

Kependudukan merupakan ilmu yang berhubungan dengan teknik pengumpulan, menyelidiki, mencatat dan mengolah data penduduk yang terdiri dari pengolahan data kelahiran, pengolahan

Puji syukur penulis panjatkan kepada Tuhan Yang Maha Esa karena atas berkat, rahmat dan segala karunia-Nya, sehingga penulis dapat menyelesaikan laporan skripsi yang

Pelayanan Kelurahan dengan sistem adalah Petugas Pelayanan Kelurahan melakukan input data kelahiran, data kematian, data penduduk datang, data penduduk pindah, dan data kk

Untuk mengatasi hal tersebut maka penulis mengusulkan atau memberikan saran dalam membenahi system yang telah ada, supaya pengolahan data dan penyimpanan data

Pada gambar 2 ditunjukan 3 entitas, yaitu Super admin, Pegawai dan Lurah yang berinteraksi dengan sistem informasi pengolahan data sensus penduduk yang mengalir

Syukur Alhamdulillah, penulis ucapkan kehadirat Allah SWT yang telah memberikan Rahmat dan Hidayah serta Karunia-Nya sehingga penulis dapat menyelesaikan penelitian dan

keluarga, laporan data kelahiran, laporan data kematian, laporan data pindah-keluar, laporan data pindah-datang, laporan data rekapitulasi penduduk dan laporan surat

o Sistem pengolahan MODIS di SB Parepare menggunakan SW IMAPP CIMMS yang berjalan dengan Vmware under Windows 7 secara otomatis o Sistem Lahta MODIS memproduksi data