Public Class Form1
Dim
Harga_kotor, Harga_Bersih As Integer
Dim
potongan As Integer
= 0
Private Sub Label8_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label8.Click
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
MyBase.Load
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles ComboBox1.SelectedIndexChanged
If
Label1.Text = ("Kemeja") Then
Harga.Text = ("80000")
ElseIf
Label1.Text = ("Kaos") Then
Harga.Text = ("60000")
ElseIf
Label1.Text = ("Gaun") Then
Harga.Text = ("150000")
ElseIf
Label1.Text = ("Jaket") Then
Harga.Text = ("90000")
End If
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles RadioButton1.CheckedChanged
RadioButton2.CheckedChanged,
RadioButton3.CheckedChanged
potongan = sender.text
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Dim
total1 As Integer
Dim
diskon As Integer
Dim
total As Integer
If
Label3.Text > 0 Then
diskon = (Harga.Text * Label3.Text
* potongan) / 100
total = (Harga.Text *
Label3.TextAlign - diskon)
TotalBelanja.Text = Format(total, "##")
ElseIf
Label3.Text = 0 Then
total1 = Harga.Text * Label3.Text
TotalBelanja.Text = Format(total1, "##")
End If
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
Dim
kembali As Double
If
Label8.Text = "" Then
MsgBox("Anda
Belum memasukan nominal pembayaran")
ElseIf
Label8.Text <= 0 Then
MsgBox("nominal
uang anda salah")
ElseIf
TotalBelanja.Text > 0 And Label8.Text > 0
Then
If
Label8.Text = TotalBelanja.Text Then
kembali = (Label8.Text -
TotalBelanja.Text)
If
kembali < 0 Then
MsgBox("uang anda kurang..!!")
Else
Kembalian.Text = kembali
End
If
End
If
End If
End Sub
Private Sub Button4_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button4.Click
Close()
End Sub
End Class
Tidak ada komentar:
Posting Komentar