Selasa, 12 Desember 2017

Tugas 3.3 Penjualan Laptop

Tugas 3.3 Penjualan Laptop

Private Sub cbokode_Click()
Dim merk As String
merk = Mid(cbokode, 7, 5)
If merk = "MC965" Then
txtmt = "Apple MacBook Air MC965"
harga = "12800000"
ElseIf merk = "MC966" Then
txtmt = "Apple MacBook Air MC966"
harga = "15800000"
ElseIf merk = "MC968" Then
txtmt = "Apple MacBook Air MC968"
harga = "9900000"
ElseIf merk = "MC969" Then
txtmt = "Apple MacBook Air MC969"
harga = "11900000"
ElseIf merk = "MC700" Then
txtmt = "Apple MacBook Pro MC700"
harga = "10800000"
ElseIf merk = "MC721" Then
txtmt = "Apple MacBook Pro MC721"
harga = "15900000"
ElseIf merk = "MC723" Then
txtmt = "Apple MacBook Pro MC723"
harga = "19300000"
ElseIf merk = "MC724" Then
txtmt = "Apple MacBook Pro MC724"
harga = "13700000"
ElseIf merk = "MC311" Then
txtmt = "Apple MacBook Pro MC311"
harga = "24200000"
ElseIf merk = "MC313" Then
txtmt = "Apple MacBook Pro MC313"
harga = "11900000"
ElseIf merk = "MC314" Then
txtmt = "Apple MacBook Pro MC314"
harga = "14700000"
ElseIf merk = "MC318" Then
txtmt = "Apple MacBook Pro MC318"
harga = "17600000"
ElseIf merk = "MC322" Then
txtmt = "Apple MacBook Pro MC322"
harga = "21300000"
ElseIf merk = "MC965" Then
txtmt = "Apple MacBook Air MC965"
harga = "12800000"
ElseIf merk = "MC966" Then
txtmt = "Apple MacBook Air MC966"
harga = "15800000"
End If
txths = harga
txtjj.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdhitung_Click()
cbokode = ""
txtmt = ""
txths = ""
txtjj = ""
txthp = ""
txtdis = ""
txttotal = ""
cbokode.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim harga, dis, total As String
harga = Val(txtjj) * (txths)
txthp = harga
If txthp > "140000000" Then
dis = Val(txthp) * 0.15
ElseIf txthp > "135000000" Then
dis = Val(txthp) * 0.1
ElseIf txthp > "130000000" Then
dis = Val(txthp) * 0.05
ElseIf txthp > "125000000" Then
dis = Val(txthp) * 0.02
End If
txtdis = dis
txttotal = Val(txthp) - Val(txtdis)
End Sub

Private Sub Form_Load()
cbokode.AddItem "Apple MC965 MacBook Air"
cbokode.AddItem "Apple MC966 MacBook Air"
cbokode.AddItem "Apple MC968 MacBook Air"
cbokode.AddItem "Apple MC969 MacBook Air"
cbokode.AddItem "Apple MC700 MacBook Pro"
cbokode.AddItem "Apple MC721 MacBook Pro"
cbokode.AddItem "Apple MC723 MacBook Pro"
cbokode.AddItem "Apple MC724 MacBook Pro"
cbokode.AddItem "Apple MC311 MacBook Pro"
cbokode.AddItem "Apple MC313 MacBook Pro"
cbokode.AddItem "Apple MC314 MacBook Pro"
cbokode.AddItem "Apple MC318 MacBook Pro"
cbokode.AddItem "Apple MC322 MacBook Pro"
cbokode.AddItem "Apple MC965 MacBook Air"
cbokode.AddItem "Apple MC966 MacBook Air"
End Sub




Tidak ada komentar:

Posting Komentar

Featured Post

Tutorial

Tutorial membuat thresholding (program matlab) Thresholding  merupakan salah satu metode segmentasi citra di mana prosesnya didasa...