Desain Form SPP
Desain Form SPP
Desain Form SPP
Sub buatkolom()
DataGridView1.Columns(0).HeaderText = "ID"
DataGridView1.Columns(1).HeaderText = "Tahun"
DataGridView1.Columns(2).HeaderText = "Nominal"
End Sub
Sub tampil()
Try
adapter = New MySql.Data.MySqlClient.MySqlDataAdapter("select
id_spp,tahun,nominal from spp", conn)
ds = New DataSet
adapter.Fill(ds, "spp")
DataGridView1.DataSource = ds.Tables(0)
Call buatkolom()
Catch ex As Exception
End Try
End Sub
Sub cari()
Try
adapter = New MySql.Data.MySqlClient.MySqlDataAdapter("select
id_spp,tahun,nominal from spp where tahun like '%" & TextBox1.Text & "%' ", conn)
ds = New DataSet
adapter.Fill(ds, "kelas")
DataGridView1.DataSource = ds.Tables(0)
Call buatkolom()
Catch ex As Exception
End Try
End Sub
Sub urutasc()
Try
adapter = New MySql.Data.MySqlClient.MySqlDataAdapter("select
id_spp,tahun,nominal from spp order by id_spp asc", conn)
ds = New DataSet
adapter.Fill(ds, "spp")
DataGridView1.DataSource = ds.Tables(0)
Call buatkolom()
Catch ex As Exception
End Try
End Sub
Sub urutdesc()
Try
adapter = New MySql.Data.MySqlClient.MySqlDataAdapter("select
id_spp,tahun,nominal from spp order by id_spp desc", conn)
ds = New DataSet
adapter.Fill(ds, "spp")
DataGridView1.DataSource = ds.Tables(0)
Call buatkolom()
Catch ex As Exception
End Try
End Sub
Sub proses()
TextBox1.Text = ""
RadioButton1.Checked = False
RadioButton2.Checked = False
TextBox2.Text = ""
TextBox2.Enabled = False
TextBox3.Text = ""
TextBox3.Enabled = False
Button1.Enabled = True
Button2.Enabled = False
Button3.Enabled = False
Button4.Enabled = False
Button5.Enabled = True
Button6.Enabled = True
End Sub
Sub proses1()
TextBox1.Text = ""
RadioButton1.Checked = False
RadioButton2.Checked = False
TextBox2.Text = ""
TextBox2.Enabled = True
TextBox3.Text = ""
TextBox3.Enabled = True
Button1.Enabled = False
Button2.Enabled = True
Button3.Enabled = False
Button4.Enabled = False
Button5.Enabled = True
Button6.Enabled = True
End Sub
End Sub