Jumat, 20 Desember 2013

tugas 2



ini prosesnya

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Nik.Items.Add("PM010")
        Nik.Items.Add("PS111")
        Nik.Items.Add("KU101")
        Nik.Items.Add("GD100")

        Jabatan.Items.Add("KEPALA DIVISI")
        Jabatan.Items.Add("STAFF")
        Jabatan.Items.Add("WAKIL KEPALA")

        Status.Items.Add("Menikah")
        Status.Items.Add("Tidak Menikah")

        Jumlah_ank.Items.Add("0")
        Jumlah_ank.Items.Add("2")
        Jumlah_ank.Items.Add("1")

    End Sub

    Private Sub Nik_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nik.SelectedIndexChanged
        Select Case Nik.Text
            Case "PM010"
                Nama.Text = "Sofiana Barus"
            Case "KU101"
                Nama.Text = "Linda Wati"
            Case "PS111"
                Nama.Text = "Deswin Tiyani"
            Case Else
                Nama.Text = " Susila"
        End Select
        Dim K As String
        K = Microsoft.VisualBasic.Left(Nik.Text, 2)
        If K = "PM" Then
            Bagian.Text = "Pemasaran"
        ElseIf K = ("PS") Then
            Bagian.Text = "Personalia"
        ElseIf K = "KU" Then
            Bagian.Text = "Keuangan"
        Else
            Bagian.Text = "Gudang"
        End If
    End Sub

    Private Sub Jabatan_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Jabatan.SelectedIndexChanged
        Select Case Jabatan.Text
            Case "Kepala Devisit"
                Gaji_pokok.Text = "5000000"
            Case "Staf"
                Gaji_pokok.Text = "2000000"
            Case Else
                Gaji_pokok.Text = "3500000"

        End Select
        Pajak.Text = Gaji_pokok.Text * 0.1
    End Sub

    Private Sub Jumlah_ank_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Jumlah_ank.KeyPress
        If e.KeyChar = Chr(13) Then
            Select Case Jumlah_ank.Text
                Case "0"
                    tnjgan_ank.Text = 0
                Case "1"
                    tnjgan_ank.Text = Gaji_pokok.Text * 0.05
                Case "2"
                    tnjgan_ank.Text = Gaji_pokok.Text * 0.1
                Case Else
                    tnjgan_ank.Text = Gaji_pokok.Text * 0.5
            End Select
        End If
        Total_gji.Text = (Gaji_pokok.Text) + Val(Tunjangan_kluarga.Text) + Val(Tunjangan_kluarga.Text) - Pajak.Text



    End Sub

    Private Sub Jumlah_ank_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Jumlah_ank.SelectedIndexChanged

    End Sub

    Private Sub BtnKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnKeluar.Click
        Dim tanya As String
        tanya = MsgBox("Apakah Anda ingin Keluar?", MsgBoxStyle.YesNo)
        If tanya = vbCancel Then
            Me.Close()
        ElseIf tanya = vbNo Then
            Me.Focus()
        ElseIf tanya = vbYes Then
            Me.Close()
        End If

    End Sub

    Private Sub BtnHapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnHapus.Click
        Nik.Text = ""
        Nama.Text = ""
        Bagian.Text = ""
        Jabatan.Text = ""
        tnjgan_ank.Text = ""
        Tunjangan_kluarga.Text = ""
        Pajak.Text = ""
        Status.Text = ""
        Gaji_pokok.Text = ""
        Total_gji.Text = ""
        Jumlah_ank.Text = ""


    End Sub

    Private Sub Status_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Status.SelectedIndexChanged
        Select Case Status.Text
            Case "Menikah"
                Tunjangan_kluarga.Text = Gaji_pokok.Text * 0.15
            Case "Tidak Menikah"

                Jumlah_ank.Text = ""
                Tunjangan_kluarga.Text = 0
        End Select

    End Sub
End Class
 



 


Minggu, 08 Desember 2013

Quis online





prosesnya

 

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Nma_brng.Items.Add("TV32")
        Nma_brng.Items.Add("TV15")
        Nma_brng.Items.Add("TV12")
    End Sub

    Private Sub Nma_brng_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nma_brng.SelectedIndexChanged
        Select Case Nma_brng.Text
            Case "TV32"
                Harga.Text = "3800000"""
            Case "TV15"
                Harga.Text = "3500000"
            Case Else
                Harga.Text = "2500000"
        End Select
    End Sub

    Private Sub Jum_jul_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Jum_jul.KeyPress
        If Asc(e.KeyChar) = 13 Then
            Total_harga.Text = Val(Harga.Text * Jum_jul.Text)
            If Jum_jul.Text > 25000000 Then
                Discont.Text = Val(Total_harga.Text * 0.1)
            Else
                Discont.Text = 0
            End If
            Totl_Pmbyr.Text = Val(Total_harga.Text - Discont.Text)
        End If
    End Sub

    Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
        Total_harga.Text = Val(Harga.Text * Jum_jul.Text)
        If Jum_jul.Text > 25000000 Then
            Discont.Text = Val(Total_harga.Text * 0.1)
        Else
            Discont.Text = 0
        End If
        Totl_Pmbyr.Text = Val(Total_harga.Text - Discont.Text)
    End Sub
End Class




Quis online


prosesnya

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Nma_brng.Items.Add("TV32")
        Nma_brng.Items.Add("TV15")
        Nma_brng.Items.Add("TV12")
    End Sub

    Private Sub Nma_brng_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nma_brng.SelectedIndexChanged
        Select Case Nma_brng.Text
            Case "TV32"
                Harga.Text = "3800000"""
            Case "TV15"
                Harga.Text = "3500000"
            Case Else
                Harga.Text = "2500000"
        End Select
    End Sub

    Private Sub Jum_jul_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Jum_jul.KeyPress
        If Asc(e.KeyChar) = 13 Then
            Total_harga.Text = Val(Harga.Text * Jum_jul.Text)
            If Jum_jul.Text > 25000000 Then
                Discont.Text = Val(Total_harga.Text * 0.1)
            Else
                Discont.Text = 0
            End If
            Totl_Pmbyr.Text = Val(Total_harga.Text - Discont.Text)
        End If
    End Sub
  Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
        Total_harga.Text = Val(Harga.Text * Jum_jul.Text)
        If Jum_jul.Text > 25000000 Then
            Discont.Text = Val(Total_harga.Text * 0.1)
        Else
            Discont.Text = 0
        End If
        Totl_Pmbyr.Text = Val(Total_harga.Text - Discont.Text)
    End Sub
End