tugas vb penjualan laptop

sofi laptop

Private Sub cbokode_Click()

Txtjj.SetFocus

End Sub

 

 

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode.Text = “”

Txtmerk.Text = “”

Txths.Text = “”

Txtjj.Text = “”

Txtdis.Text = “”

Txttb.Text = “”

Txthp.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim penjualan, discount, kode, merk, bayar, n, d As String

Dim harga As Variant

kode = Mid(cbokode.Text, 7, 5)

If kode = “MC965″ Then

merk = “Apple MacBook Air MC965″

harga = “12800000″

ElseIf kode = “MC966″ Then

merk = “Apple MacBook Air MC966″

harga = “15800000″

ElseIf kode = “MC968″ Then

merk = “Apple MacBook Air MC968″

harga = “9900000″

ElseIf kode = “MC969″ Then

merk = “Apple MacBook Air MC969″

harga = “11900000″

ElseIf kode = “MC700″ Then

merk = “Apple MacBook Air MC700″

harga = “10800000″

ElseIf kode = “MC721″ Then

merk = “Apple MacBook Air MC721″

harga = “15900000″

ElseIf kode = “MC723″ Then

merk = “Apple MacBook Air MC723″

harga = “19300000″

ElseIf kode = “MC724″ Then

merk = “Apple MacBook Air MC724″

harga = “13700000″

ElseIf kode = “MC311″ Then

merk = “Apple MacBook Air MC311″

harga = “24200000″

ElseIf kode = “MC313″ Then

merk = “Apple MacBook Air MC313″

harga = “11900000″

ElseIf kode = “MC314″ Then

merk = “Apple MacBook Air MC314″

harga = “14700000″

ElseIf kode = “MC318″ Then

merk = “Apple MacBook Air MC318″

harga = “17600000″

ElseIf kode = “MC322″ Then

merk = “Apple MacBook Air MC322″

harga = “21300000″

ElseIf kode = “MC965″ Then

merk = “Apple MacBook Air MC965″

harga = “12800000?”

ElseIf kode = “MC966″ Then

merk = “Apple MacBook Air MC966″

harga = “15800000″

End If

Txtmerk.Text = merk

Txths.Text = harga

n = Val(Txtjj.Text)

d = Val(Txths.Text)

penjualan = n * d

Txthp.Text = penjualan

Select Case Txthp.Text

Case Is > 140000000

discount = 0.15 * penjualan

Case Is > 135000000

discount = 0.1 * penjualan

Case Is > 130000000

discount = 0.05 * penjualan

Case Is > 125000000

discount = 0.02 * penjualan

End Select

penjualan = Val(Txthp.Text)

Txtdis.Text = discount

Txttb.Text = Val(Txthp.Text) – Val(Txtdis.Text)

End Sub

 

 

Private Sub Form_Load()

cbokode.AddItem “Apple MC965 MasBook Air”

cbokode.AddItem “Apple MC966 MasBook Air”

cbokode.AddItem “Apple MC968 MasBook Air”

cbokode.AddItem “Apple MC969 MasBook Air”

cbokode.AddItem “Apple MC700 MasBook Pro”

cbokode.AddItem “Apple MC721 MasBook Pro”

cbokode.AddItem “Apple MC723 MasBook Pro”

cbokode.AddItem “Apple MC724 MasBook Pro”

cbokode.AddItem “Apple MC311 MasBook Pro”

cbokode.AddItem “Apple MC313 MasBook Pro”

cbokode.AddItem “Apple MC314 MasBook Pro”

cbokode.AddItem “Apple MC318 MasBook Pro”

cbokode.AddItem “Apple MC322 MasBook Pro”

cbokode.AddItem “Apple MC965 MasBook Air”

cbokode.AddItem “Apple MC966 MasBook Air”

End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s