Public Class Form1
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Call
buattable()
MataKuliah.Items.Add("C Sharp")
MataKuliah.Items.Add("VB.NET")
MataKuliah.Items.Add("Basis Data")
NPM.Items.Add("13110371")
NPM.Items.Add("13202136")
MataKuliah.Items.Add("Konsep Pemograman")
MataKuliah.Items.Add("Teknik Digital")
MataKuliah.Items.Add("Visual Basic")
MataKuliah.Items.Add("Komunikasi Data")
End Sub
Sub
buattable()
LV.Columns.Add("NPM",
80, HorizontalAlignment.Center)
LV.Columns.Add("Nama",
180, HorizontalAlignment.Center)
LV.Columns.Add("NILAI
UTS", 80, HorizontalAlignment.Center)
LV.Columns.Add("NILAI
UAS", 80, HorizontalAlignment.Center)
LV.Columns.Add("NILAI
Angka", 80, HorizontalAlignment.Center)
LV.Columns.Add("NILAI
Huruf", 80, HorizontalAlignment.Center)
LV.View = View.Details
LV.GridLines = True
LV.FullRowSelect = True
End Sub
Sub
isitable()
Dim lst
As New
ListViewItem
lst.Text = NPM.Text
lst.SubItems.Add(Nama.Text)
lst.SubItems.Add(MataKuliah.Text)
lst.SubItems.Add(NilaiUTS.Text)
lst.SubItems.Add(NilaiUAS.Text)
lst.SubItems.Add(NilaiAngka.Text)
lst.SubItems.Add(NilaiHuruf.Text)
LV.Items.Add(lst)
End Sub
Private Sub Btnisilist_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Btnisilist.Click
Call
isitable()
NPM.Text = ""
Nama.Text = ""
End Sub
Private Sub Btnhapuslist_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Btnhapuslist.Click
LV.Items.Clear()
End Sub
Private Sub Btnnpm_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Btnnpm.Click
LV.Items.Remove(LV.SelectedItems(0))
End Sub
Private Sub Btnkeluar_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Btnkeluar.Click
Me.Close()
End Sub
Private Sub NPM_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
NPM.SelectedIndexChanged
If
NPM.Text = "13110371" Then
Nama.Text = "Romaida Tambunan"
ElseIf
NPM.Text = "13202136" Then
Nama.Text = "Walmiron Tambunan"
End If
End Sub
Private Sub Btnhapusdata_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Btnhapusdata.Click
NPM.Text = ""
Nama.Text = ""
MataKuliah.Text = ""
NilaiUTS.Text = ""
NilaiUAS.Text = ""
NilaiAngka.Text = ""
NilaiHuruf.Text = ""
End Sub
Private Sub NilaiUTS_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs)
NilaiUTS.Text = NilaiUTS.Text * "0.30"
End Sub
Private Sub BtnProses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BtnProses.Click
NilaiAngka.Text = 0.4 * NilaiUTS.Text +
Val(0.6 * NilaiUAS.Text)
If
NilaiAngka.Text >= 80 Then
NilaiHuruf.Text = "A"
ElseIf
NilaiAngka.Text >= 70 Then
NilaiHuruf.Text = "B"
ElseIf
NilaiAngka.Text > 60 Then
NilaiHuruf.Text = "C"
ElseIf
NilaiAngka.Text > 50 Then
NilaiHuruf.Text = "D"
Else
NilaiHuruf.Text = "E"
End If
End Sub
End Class
Demikilahlah postingan saya Nama : (Romaida Tambunan) NPM : (13110371)
Selamat Belajar Pemrograman VB NET
Selamat Belajar Pemrograman VB NET