yuk kita belajar vb.net 2008
semoga bermanfaat
Public Class Form2
Sub addbersih()
npm.Text = ""
nama.Text = ""
jenjang.Text = ""
jurusan.Text = ""
kodedosen.Text = ""
namadosen.Text = ""
kodematkul.Text = ""
namamatkul.Text = ""
nhadir.Text = ""
ntugas.Text = ""
nuts.Text = ""
nuas.Text = ""
nahir.Text = ""
nhruf.Text = ""
keterangan.Text = ""
End Sub
Sub addkodematkul()
kodematkul.Items.Add("D 01")
kodematkul.Items.Add("D 02")
kodematkul.Items.Add("D 03")
kodematkul.Items.Add("D 04")
kodematkul.Items.Add("D 05")
kodematkul.Items.Add("D 06")
kodematkul.Items.Add("D 07")
kodematkul.Items.Add("D 08")
kodematkul.Items.Add("D 09")
End Sub
Sub addkodedosen()
kodedosen.Items.Add("MX 001")
kodedosen.Items.Add("RS 002")
kodedosen.Items.Add("DK 003")
kodedosen.Items.Add("DB 004")
kodedosen.Items.Add("BK 005")
kodedosen.Items.Add("DJ 006")
kodedosen.Items.Add("CD 007")
kodedosen.Items.Add("DM 008")
kodedosen.Items.Add("RK 009")
End Sub
Sub addnpm()
npm.Items.Add("12110203")
npm.Items.Add("12110200")
npm.Items.Add("12110207")
npm.Items.Add("12110154")
npm.Items.Add("12110187")
End Sub
Sub addlooping()
Dim x As Integer
For x = 100 To 1 Step -2
nhadir.Items.Add(x)
ntugas.Items.Add(x)
nuts.Items.Add(x)
nuas.Items.Add(x)
Next x
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call addnpm()
Call addkodedosen()
Call addkodematkul()
Call addlooping()
End Sub
Private Sub npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles npm.SelectedIndexChanged
Select Case npm.Text
Case "12110201"
nama.Text = "RIKI SUDIRMAN"
jenjang.Text = "S I"
jurusan.Text = "Teknik Informatika"
Case "12110200"
nama.Text = "M.SHODEQ"
jenjang.Text = "S I"
jurusan.Text = "Sistem Informasi"
Case "12110207"
nama.Text = "Sri Ayuni"
jenjang.Text = "D III"
jurusan.Text = "Manajemen Informatika"
Case "12110154"
nama.Text = "Rini Astuti"
jenjang.Text = "D III "
jurusan.Text = "Akutansi"
Case "12110187"
nama.Text = "Muhammad Raphly"
jenjang.Text = "D I"
jurusan.Text = "Teknik Komputer"
Case Else
nama.Text = "-"
End Select
keterangan.Text = "-"
End Sub
Private Sub kodedosen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kodedosen.SelectedIndexChanged
Select Case kodedosen.Text
Case "MX 001"
namadosen.Text = "Mesran S.kom, M.kom"
Case "RS 002"
namadosen.Text = "Tonni Limbong S.Kom, M.Kom"
Case "DK 003"
namadosen.Text = "Sinar Sinurat ST. M.Kom"
Case "DB 004"
namadosen.Text = "Kristian Siregar S.Kom"
Case "BK 005"
namadosen.Text = "Abdul Sani Sembiring S.Kom, M.Kom"
Case "DJ 006"
namadosen.Text = "Sony Bahagia Sinaga S.Kom"
Case "CD 007"
namadosen.Text = "Pandi Simangunsong S.Kom"
Case "DM 008"
namadosen.Text = "Kennedi Tampubolon S.Si"
Case "RK 009"
namadosen.Text = "A.M. Hatuaon Sihite SE, MM"
Case Else
namadosen.Text = "-"
End Select
End Sub
Private Sub kodematkul_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kodematkul.SelectedIndexChanged
Select Case kodematkul.Text
Case "D 01"
namamatkul.Text = "Visual Basic"
Case "D 02"
namamatkul.Text = "Konsep Pemrograman"
Case "D 03"
namamatkul.Text = "Maatematika Diskrit"
Case "D 04"
namamatkul.Text = "Pemrograman HTML"
Case "D 05"
namamatkul.Text = "Sistem Operasi"
Case "D 06"
namamatkul.Text = "Komunikasi Data"
Case "D 07"
namamatkul.Text = "Sistem Basis Data"
Case "D 08"
namamatkul.Text = "Kalkulus II"
Case "D 09"
namamatkul.Text = "Manajemen Umum"
Case Else
namamatkul.Text = "-"
End Select
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 btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
nahir.Text = nhadir.Text * 0.1 + ntugas.Text * 0.15 + nuts.Text * 0.3 + nuas.Text * 0.45
If nahir.Text >= 81 Then
nhruf.Text = "A"
ElseIf nahir.Text >= 75 Then
nhruf.Text = "B+"
ElseIf nahir.Text >= 70 Then
nhruf.Text = "B"
ElseIf nahir.Text >= 65 Then
nhruf.Text = "C+"
ElseIf nahir.Text >= 60 Then
nhruf.Text = "C"
ElseIf nahir.Text >= 50 Then
nhruf.Text = "D"
Else
nhruf.Text = "E"
End If
End Sub
Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
Call addbersih()
End Sub
End Class
ini hasil akhirnya....
Minggu, 01 Desember 2013
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar