Public Class Form_Mahasiswa
Private Sub Form_Mahasiswa_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
npm.Items.Add("1311456")
npm.Items.Add("134456")
npm.Items.Add("167679")
mataK.Items.Add("Sistem Operasi")
mataK.Items.Add("VB")
Call
buattabel()
End Sub
Sub
buattabel()
LV.Columns.Add("npm",
80, HorizontalAlignment.Center)
LV.Columns.Add("Nama",
150, HorizontalAlignment.Left)
LV.Columns.Add("mata
kuliah", 80, HorizontalAlignment.Left)
LV.Columns.Add("nilai
uts", 150, 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
isitabel()
Dim lst
As New
ListViewItem
lst.Text = npm.Text
lst.SubItems.Add(nama.Text)
lst.SubItems.Add(mataK.Text)
lst.SubItems.Add(uts.Text)
lst.SubItems.Add(uas.Text)
lst.SubItems.Add(angka.Text)
lst.SubItems.Add(huruf.Text)
LV.Items.Add(lst)
End Sub
Private Sub btnisi_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnisi.Click
Call
isitabel()
npm.Text = ""
nama.Text = ""
mataK.Text = ""
uts.Text = ""
uas.Text = ""
angka.Text = ""
huruf.Text = ""
End Sub
Private Sub btnproses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnproses.Click
angka.Text = 0.15 * uts.Text + 0.45 *
uas.Text
If
angka.Text > 50 Then
huruf.Text = "A"
ElseIf
angka.Text < 50 Then
huruf.Text = "C"
End If
End Sub
Private Sub btnhpsNpm_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnhpsNpm.Click
LV.Items.Clear()
End Sub
Private Sub btnhpslist_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnhpslist.Click
LV.Items.Remove(LV.SelectedItems(0))
End Sub
Private Sub btnhpsdata_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnhpsdata.Click
LV.Items.Clear()
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 = 1311456 And nama.Text = "Eli sinar rianti" Then
End If
End Sub
End Class
Tidak ada komentar:
Posting Komentar