Public Class Form1
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Call
addNPM()
Call
addkodedosen()
Call
addkodematakuliah()
End Sub
Sub
addNPM()
NPM.Items.Add("12110796")
NPM.Items.Add("12110760")
NPM.Items.Add("12110758")
End Sub
Sub
addkodedosen()
kodedosen.Items.Add("KBTI4305")
kodedosen.Items.Add("KBTI4306")
End Sub
Sub
addkodematakuliah()
kodematakuliah.Items.Add("0075")
kodematakuliah.Items.Add("0567")
End Sub
Private Sub NPM_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
NPM.SelectedIndexChanged
If
NPM.Text = "12110796" Then
Nama.Text = "AHMAD RIYAN DAYANI"
jenjang.Text = "S1"
Jurusan.Text = "Teknologi Informasi & Networking"
ElseIf
NPM.Text = "12110760" Then
Nama.Text = "SAHRUL"
jenjang.Text = "D3"
Jurusan.Text = "Manajemen Informatika"
ElseIf
NPM.Text = "12110758" Then
Nama.Text = "ARDIANSYAH"
jenjang.Text = "D1"
Jurusan.Text = "Komputerisasi Akuntansi"
End If
End Sub
Private Sub kodedosen_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
kodedosen.SelectedIndexChanged
Select Case kodedosen.Text
Case
"KBTI4305"
namadosen.Text = "Mesran,M.kom"
Case
"KBTI4306"
namadosen.Text = "Yasir Hasan,S.kom"
End Select
End Sub
Private Sub kodematakuliah_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
kodematakuliah.SelectedIndexChanged
If
kodematakuliah.Text = "0075" Then
matakuliah.Text = "Pemograman Visual"
ElseIf
kodematakuliah.Text = "0567" Then
matakuliah.Text = "Sistem Operasi"
End If
End Sub
Private Sub Btnproses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Btnproses.Click
tn.Text = 0.1 * nt.Text + 0.15 *
nm.Text + 0.35 * nuts.Text + 0.4 * nuas.Text
If
tn.Text >= 80 Then
nh.Text = "A"
ElseIf
tn.Text >= 70 Then
nh.Text = "B"
ElseIf
tn.Text >= 60 Then
nh.Text = "C"
ElseIf
tn.Text >= 50 Then
nh.Text = "D"
Else
nh.Text = "E"
End If
End Sub
Private Sub Btnhapus_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Btnhapus.Click
NPM.Text = ""
Nama.Text = ""
jenjang.Text = ""
Jurusan.Text = ""
kodedosen.Text = ""
namadosen.Text = ""
kodematakuliah.Text = ""
matakuliah.Text = ""
nt.Text = ""
nm.Text = ""
nuts.Text = ""
nuas.Text = ""
tn.Text = ""
nh.Text = ""
NPM.Focus()
End Sub
Private Sub Btnkeluar_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles Btnkeluar.Click
Me.Close()
End Sub
End Class
hasilnya:
Tidak ada komentar:
Posting Komentar