Sabtu, 05 Maret 2011

VISUAL BASIC ( SEWA KOSTAN )

NAMA : DANIEL BUDIMAN
NPM: 1006724311
Universitas Indonesia
Penjelasan
  Pada tugas visual basic ini saya membuat aplikasi penyewaan kost-kostan
berikut penjelasan dan cara menjalankan program ini:
1. kita pilih type kost2an yg kita ingin kan
2. Cari nama barang yang ingin kita beli di combobox1
3. pilih lama sewa
4. pilih type pembayaran dgn credit(charge 10 %) atau cash
5. klik clear untuk clear textbox 1 dan 2

inputnya dan output bila pembayaran dgn credit


inputnnya dan outputnya bila di clear
inputnya dan outputnya bila pembayaran dgn cash
KODING :
Public Class Form1

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If ComboBox1.Text = "kecil" Then
            TextBox1.Text = "150000"
        Else
            If ComboBox1.Text = "sedang" Then
                TextBox1.Text = "200000"
            Else
                If ComboBox1.Text = "besar" Then
                    TextBox1.Text = "300000"
                End If
                End If
            End If
    End Sub

    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        If ComboBox2.Text = "1 bulan" Then
            TextBox2.Text = TextBox1.Text * 1
        Else
            If ComboBox2.Text = "3 bulan" Then
                TextBox2.Text = TextBox1.Text * 3
            Else
                If ComboBox2.Text = "6 bulan" Then
                    TextBox2.Text = TextBox1.Text * 6
                End If
                End If
            End If

    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        If ComboBox2.Text = "1 bulan" Then
            TextBox2.Text = TextBox1.Text * 1 + (10 / 100 * TextBox1.Text)
        Else
            If ComboBox2.Text = "3 bulan" Then
                TextBox2.Text = TextBox1.Text * 3 + (10 / 100 * TextBox1.Text)
            Else
                If ComboBox2.Text = "6 bulan" Then
                    TextBox2.Text = TextBox1.Text * 6 + (10 / 100 * TextBox1.Text)
                End If
            End If
        End If

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Clear()
        TextBox2.Clear()
       
    End Sub
End Class

demikian penjelasannya kurang lebihnya saya mohon maaf, bila ada kesalahan mohon di komentarkan . terimakasih

Tidak ada komentar:

Posting Komentar