Program List View Mahasiswa Di VB.Net 2008
Listing Programs >>
Public Class Form1
Sub jurusan1()
cmb_jur.Items.Clear()
With cmb_jur
.Items.Add("S1/Teknik Informatika")
.Items.Add("S1/Sistem Informasi")
.Items.Add("D3/Manajemen Informatika")
.Items.Add("D3/Komputerisasi Akutansi")
.Items.Add("D1/Teknisi Komputer")
.Items.Add("D1/Manajemen Informatika")
.Items.Add("D1/Design Grafis")
End With
End Sub
Sub kelas1()
Cmb_kelas.Items.Clear()
With Cmb_kelas
.Items.Add("Pagi")
.Items.Add("Siang")
.Items.Add("Malam")
End With
End Sub
Sub bersih(ByVal f As Form)
Dim x As Object
For Each x In f.Controls
If TypeOf x Is TextBox Then x.text = ""
If TypeOf x Is ComboBox Then x.text = ""
Next
End Sub
Sub IsiTabel()
Dim Lst As New ListViewItem
Lst.Text = txt_nama.Text
Lst.SubItems.Add(txt_npm.Text)
Lst.SubItems.Add(cmb_jur.Text)
Lst.SubItems.Add(Cmb_kelas.Text)
If rd_Lk.Checked = True Then
Lst.SubItems.Add(rd_Lk.Text)
rd_Pr.Checked = False
ElseIf rd_Pr.Checked = True Then
Lst.SubItems.Add(rd_Pr.Text)
rd_Lk.Checked = False
End If
Lv.Items.Add(Lst)
End Sub
Private Sub Btn_simpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_simpan.Click
IsiTabel()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
jurusan1()
kelas1()
End Sub
Private Sub Btn_Lv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Lv.Click
Lv.Items.Clear()
End Sub
Private Sub Btn_hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_hapus.Click
Call bersih(Me)
rd_Lk.Checked = False
rd_Pr.Checked = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Lv.Items.Remove(Lv.SelectedItems(0))
End Sub
End Class
Thanks Telah Membaca ....
Semoga Bermanfaat :-) :-)
Semoga Bermanfaat :-) :-)
0 komentar:
Posting Komentar