Minggu, 24 November 2013

Tugas SI.P-1203

  ini design nya :


berikut ini adalah carany :

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        npm.Items.Add("13111000")
        npm.Items.Add("13111001")
        npm.Items.Add("13111011")
        Me.Text = " FORM NILAI "
        Me.BackColor = Color.Blue
       
        kdosen.Items.Add("01")
        kdosen.Items.Add("02")
        kdosen.Items.Add("03")

        kode_mt.Items.Add("001")
        kode_mt.Items.Add("002")
        kode_mt.Items.Add("003")

        nk.Items.Add("40")
        nk.Items.Add("50")
        nk.Items.Add("60")
        nk.Items.Add("70")
        nk.Items.Add("80")
        nk.Items.Add("90")

        nt.Items.Add("40")
        nt.Items.Add("50")
        nt.Items.Add("60")
        nt.Items.Add("70")
        nt.Items.Add("80")
        nt.Items.Add("90")

        nu.Items.Add("40")
        nu.Items.Add("50")
        nu.Items.Add("60")
        nu.Items.Add("70")
        nu.Items.Add("80")
        nu.Items.Add("90")

        nuas.Items.Add("40")
        nuas.Items.Add("50")
        nuas.Items.Add("60")
        nuas.Items.Add("70")
        nuas.Items.Add("80")
        nuas.Items.Add("90")
    End Sub

    Private Sub npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles npm.SelectedIndexChanged
        Select Case npm.Text
            Case "13111000"
                nama.Text = "Andi Jost"
                jenjang.Text = "S1"
                jurusan.Text = "Tehnik Informatika"
                proses.BackColor = Color.Orange
                keluar.BackColor = Color.Red
                hapus.BackColor = Color.Green
                Me.BackColor = Color.Crimson
            Case "13111001"
                nama.Text = "Joko S"
                jenjang.Text = "D3"
                jurusan.Text = "Manajemen Informatika"
                proses.BackColor = Color.Green
                keluar.BackColor = Color.Magenta
                hapus.BackColor = Color.Blue
                Me.BackColor = Color.BlueViolet
            Case Else
                nama.Text = "Ani S"
                jenjang.Text = "D1"
                jurusan.Text = "design Grafis"
                Me.BackColor = Color.Orange
                proses.BackColor = Color.Red
                keluar.BackColor = Color.Gold
        End Select
    End Sub

    Private Sub kdosen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kdosen.SelectedIndexChanged
        If kdosen.Text = "01" Then
            ndosen.Text = "Mesran.net"
        ElseIf kdosen.Text = "02" Then
            ndosen.Text = "Taroni Zebua"
        Else
            ndosen.Text = "Aulia Ramadhan"
        End If
    End Sub

    Private Sub hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapus.Click
        npm.Text = ""
        nama.Text = ""
        jenjang.Text = ""
        jurusan.Text = ""
        kdosen.Text = ""
        ndosen.Text = ""
        kode_mt.Text = ""
        mkuliah.Text = ""
        nk.Text = ""
        nt.Text = ""
        nu.Text = ""
        nuas.Text = ""
        nakhir.Text = ""
        nhuruf.Text = ""
        keterangan.Text = ""
    End Sub

    Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keluar.Click
        Me.Close()
    End Sub

    Private Sub kode_mt_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kode_mt.SelectedIndexChanged
        Select Case kode_mt.Text
            Case "001"
                mkuliah.Text = "visuL Basic"
            Case "002"
                mkuliah.Text = "kalkulus"
            Case Else
                mkuliah.Text = "Matriks"
        End Select
    End Sub

    Private Sub proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proses.Click

        nakhir.Text = 0.1 * nk.Text + 0.15 * nt.Text + 0.3 * nu.Text + 0.45 * nuas.Text

        Dim a As Integer
        a = nakhir.Text
        Select Case a
            Case Is >= 50
                keterangan.Text = "lulus"
            Case Is <= 50
                keterangan.Text = "gagal"
        End Select

        If nakhir.Text >= 80 Then
            nhuruf.Text = "A"
        ElseIf nakhir.Text >= 70 Then
            nhuruf.Text = "B"
        ElseIf nakhir.Text >= 60 Then
            nhuruf.Text = "C"
        ElseIf nakhir.Text >= 50 Then
            nhuruf.Text = "D"
        ElseIf nakhir.Text <= 50 Then
            nhuruf.Text = "E"
        End If
    End Sub
End Class

hasiny :


tugas : mesran.net


Tidak ada komentar:

Posting Komentar