Sabtu, 07 Desember 2013

Ini progam pertamanya


ini Prosesnya

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Npm.Items.Add("12110979")
        Npm.Items.Add("12110777")
        Npm.Items.Add("12110987")
        Npm.Items.Add("12110977")
        Npm.Items.Add("12110778")
        Kdo_Dosen.Items.Add("301")
        Kdo_Dosen.Items.Add("302")
        Kdo_Dosen.Items.Add("303")
        Kdo_Dosen.Items.Add("304")
        Kdo_Dosen.Items.Add("305")
        Kde_makul.Items.Add("201")
        Kde_makul.Items.Add("202")
        Kde_makul.Items.Add("203")
        Kde_makul.Items.Add("204")
        Kde_makul.Items.Add("205")

        Dim x As Integer
        For x = 1 To 100
            kehadiran.Items.Add(x)
            tugas.Items.Add(x)
            UTS.Items.Add(x)
            UAS.Items.Add(x)
        Next x
    End Sub

    Private Sub Npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Npm.SelectedIndexChanged
        Select Case Npm.Text
            Case "12110979"
                N_Mha.Text = "Sofiana Barus"
                jenjang.Text = "S1"
                Jurusan.Text = "TI"
            Case "12110777"
                N_Mha.Text = "Susila"
                jenjang.Text = "S1"
                Jurusan.Text = "TI"
            Case "12110987"
                N_Mha.Text = "Linda  Wati"
                jenjang.Text = "S1"
                Jurusan.Text = "TI"
            Case "12110977"
                N_Mha.Text = "Deswin Tiyani"
                jenjang.Text = "S1"
                Jurusan.Text = "TI"
            Case Else
                N_Mha.Text = "Lia Anugrah"
                jenjang.Text = "S1"
                Jurusan.Text = "TI"

        End Select
    End Sub

    Private Sub Kdo_Dosen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kdo_Dosen.SelectedIndexChanged
        Select Case Kdo_Dosen.Text
            Case "301"
                Nma_Dosen.Text = "Yasir Hasan, S.kom"
            Case "302"
                Nma_Dosen.Text = "Philipus Tarigan,ST.M Kom"
            Case "303"
                Nma_Dosen.Text = "Mesran,S.Kom,M Kom"
            Case "304"
                Nma_Dosen.Text = "Kenndi Tampubolon,S.Si"
            Case Else
                Nma_Dosen.Text = "Pristiwanto,S.Kom"
        End Select
    End Sub

    Private Sub Kde_makul_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kde_makul.SelectedIndexChanged
        Select Case Kde_makul.Text
            Case "201"
                Makul.Text = "Pemrograman Visual"
            Case "202"
                Makul.Text = "Struktur Data"
            Case "203"
                Makul.Text = "Arsitektur & Organisasi Komputer"
            Case "204"
                Makul.Text = "Komunikasi Data"
            Case Else
                Makul.Text = "Matriks & Transformasi Linier "
        End Select
    End Sub

    Private Sub BtnProses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnProses.Click
        akhir.Text = 0.1 * kehadiran.Text + 0.15 * tugas.Text + 0.4 * UTS.Text + 0.6 * UAS.Text
        If akhir.Text >= 80 Then
            huruf.Text = "A"
            keterangan.Text = "Lulus"
        ElseIf akhir.Text >= 70 Then
            huruf.Text = "B"
            keterangan.Text = "Lulus"
        ElseIf akhir.Text >= 60 Then
            huruf.Text = "C+"
            keterangan.Text = "Lulus"
        ElseIf akhir.Text >= 50 Then
            huruf.Text = "C"
            keterangan.Text = "Perbaikan"
        ElseIf akhir.Text >= 40 Then
            huruf.Text = "D"
            keterangan.Text = "Ujian Ulang"
        Else
            huruf.Text = "E"
            keterangan.Text = "Gagal"
        End If

    End Sub

    Private Sub BtnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnHapus.Click
        Npm.Text = ""
        N_Mha.Text = ""
        jenjang.Text = ""
        Jurusan.Text = ""
        Kdo_Dosen.Text = ""
        Nma_Dosen.Text = ""
        Kde_makul.Text = ""
        Makul.Text = ""
        kehadiran.Text = ""
        tugas.Text = ""
        UTS.Text = ""
        UAS.Text = ""
        akhir.Text = ""
        huruf.Text = ""
        keterangan.Text = ""
    End Sub

    Private Sub BtnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnKeluar.Click
        End
    End Sub
End Class



Hasilnya





Tidak ada komentar:

Posting Komentar