Tuesday, December 3, 2013

MENCARI PENILAI MAHASISWA MELALUI VB NET



  CARA MEMBUAT PENILAI MAHASISWA MELALUI VB NET..

""Dari tampilan Program di atas komponen yang kita perlukan adalah 15 label , 8 textbox, 7 combobox , 3 button."
NI PROGRAM NYA...

Public Class Form1

    Private Sub Nilai_Mahasisiwa_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
pada kemudian double click
        npm.Items.Add("12110079")
        npm.Items.Add("12110070")
        npm.Items.Add("12110080")

        kddosen.Items.Add("AERDOS112")
        kddosen.Items.Add("BBODOS113")
        kddosen.Items.Add("KDOS114")

        kdmatkul.Items.Add("KDMAT001")
        kdmatkul.Items.Add("KDMAT002")
        kdmatkul.Items.Add("KDMAT003")

        Dim i As Integer
        For i = 100 To 1 Step -1
            nlhadir.Items.Add(i)
        Next
        For i = 100 To 1 Step -1
            nltugas.Items.Add(i)
        Next
        For i = 100 To 1 Step -1
            nluts.Items.Add(i)
        Next
        For i = 100 To 1 Step -1
            nluas.Items.Add(i)
        Next
    End Sub

    Private Sub npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles npm.SelectedIndexChanged
        If npm.Text = "12110079" Then
            nama.Text = "Khairul amri yusro"
            jurusan.Text = "Teknik Informatika"
            jenjang.Text = "S1"
        ElseIf npm.Text = "12110070" Then
            nama.Text = "Abdul Rahim"
            jurusan.Text = "Sistem Informasi"
            jenjang.Text = "D1"
        Else
            nama.Text = "Arifin"
            jurusan.Text = "Manajemen Informatika"
            jenjang.Text = "D3"
        End If
    End Sub

    Private Sub kddosen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kddosen.SelectedIndexChanged
        If kddosen.Text = "AERDOS112" Then
            nmdosen.Text = "Mesran, M.kom"
        ElseIf kddosen.Text = "BBODOS113" Then
            nmdosen.Text = "Pilipus Tarigan, ST, M.kom"
        ElseIf kddosen.Text = "KDOS114" Then
            nmdosen.Text = "Kristian Siregar, S.kom"
        End If
    End Sub

    Private Sub kdmatkul_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kdmatkul.SelectedIndexChanged
        If kdmatkul.Text = "KDMAT001" Then
            nmmatkul.Text = "Pemograman Visual"
        ElseIf kdmatkul.Text = "KDMAT002" Then
            nmmatkul.Text = "Arsitektur Komputer"
        ElseIf kdmatkul.Text = "KDMAT003" Then
            nmmatkul.Text = "Pemograman HTML"
        End If
    End Sub

    Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
        nlakhir.Text = 0.1 * nlhadir.Text + 0.15 * nltugas.Text + 0.3 * nluts.Text + 0.45 * nluas.Text
        If nlakhir.Text >= 80 Then
            nlhuruf.Text = "A"
        ElseIf nlakhir.Text >= 70 Then
            nlhuruf.Text = "B"
        ElseIf nlakhir.Text >= 60 Then
            nlhuruf.Text = "C"
        ElseIf nlakhir.Text >= 50 Then
            nlhuruf.Text = "D"
        Else
            nlhuruf.Text = "E"
        End If

        If nluas.Text >= 50 Then
            keterangan.Text = "LULUS"
        Else
            keterangan.Text = "GAGAl"
        End If
    End Sub
    Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
        Me.Close()
        npm.Focus()
    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 = ""
        kddosen.Text = ""
        nmdosen.Text = ""
        kdmatkul.Text = ""
        nmmatkul.Text = ""
        nlhadir.Text = ""
        nltugas.Text = ""
        nluts.Text = ""
        nluas.Text = ""
        nlakhir.Text = ""
        nlhuruf.Text = ""
        keterangan.Text = ""
    End Sub
End Class
                                     ~"INI DIA HASIL NYA  SEMOGA BERMANFAAT"~

0 comments:

Post a Comment