Está en la página 1de 4

Public Class Form1

Dim TotalBayar As Integer = 0


Dim TotalKembali As Integer = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub BtnJumlah_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BtnJumlah.Click

7000)

If Not String.IsNullOrEmpty(TxtCola.Text) Then


TotalBayar = TotalBayar + (Convert.ToInt32(TxtCola.Text) *
End If
If Not String.IsNullOrEmpty(TxtFanta.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtFanta.Text) *

7000)

7000)

End If
If Not String.IsNullOrEmpty(TxtSprite.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtSprite.Text) *
End If
If Not String.IsNullOrEmpty(TxtTehManis.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtTehManis.Text) *

3000)

5000)

End If
If Not String.IsNullOrEmpty(TxtSusu.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtSusu.Text) *
End If

If Not String.IsNullOrEmpty(TxtKopi.Text) Then


TotalBayar = TotalBayar + (Convert.ToInt32(TxtKopi.Text) *
5000)

End If

10000)

If Not String.IsNullOrEmpty(TxtAlpukat.Text) Then


TotalBayar = TotalBayar + (Convert.ToInt32(TxtAlpukat.Text) *
End If
If Not String.IsNullOrEmpty(TxtMangga.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtMangga.Text) *

9000)

End If

8000)

If Not String.IsNullOrEmpty(TxtJeruk.Text) Then


TotalBayar = TotalBayar + (Convert.ToInt32(TxtJeruk.Text) *
End If
If Not String.IsNullOrEmpty(TxtAyamBakar.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtAyamBakar.Text) *

15000)

End If
If Not String.IsNullOrEmpty(TxtBebekBakar.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtBebekBakar.Text)

* 18000)

End If
If Not String.IsNullOrEmpty(TxtJagungBakar.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtJagungBakar.Text)
* 10000)

End If
If Not String.IsNullOrEmpty(TxtAyamGoreng.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtAyamGoreng.Text)

* 14000)

End If
If Not String.IsNullOrEmpty(TxtMieGoreng.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtMieGoreng.Text) *
10000)

* 6000)

End If
If Not String.IsNullOrEmpty(TxtTelorGoreng.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtTelorGoreng.Text)
End If
If Not String.IsNullOrEmpty(TxtMieRebus.Text) Then
TotalBayar = TotalBayar + (Convert.ToInt32(TxtMieRebus.Text) *

10000)

End If

If Not String.IsNullOrEmpty(TxtSingkongRebus.Text) Then


TotalBayar = TotalBayar +
(Convert.ToInt32(TxtSingkongRebus.Text) * 5000)
End If
If Not String.IsNullOrEmpty(TxtUbiRebus.Text) Then

TotalBayar = TotalBayar + (Convert.ToInt32(TxtUbiRebus.Text) *

5000)

End If
TxtTotalBayar.Text = TotalBayar.ToString()

End Sub
Private Sub BtnHitung_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BtnHitung.Click
TotalKembali = Convert.ToInt32(TxtBayar.Text) - TotalBayar
TxtKembali.Text = TotalKembali.ToString()
MessageBox.Show("Terima Kasih, " + TxtNama.Text)
End Sub
Private Sub BtnExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BtnExit.Click
TxtTotalBayar.Text = ""
TxtBayar.Text = ""
TxtKembali.Text = ""
TxtCola.Text = ""
TxtSprite.Text = ""
TxtFanta.Text = ""
TxtTehManis.Text = ""
TxtSusu.Text = ""
TxtKopi.Text = ""
TxtAlpukat.Text = ""
TxtMangga.Text = ""
TxtJeruk.Text = ""
TxtAyamBakar.Text = ""
TxtBebekBakar.Text = ""
TxtJagungBakar.Text = ""
TxtAyamGoreng.Text = ""
TxtMieGoreng.Text = ""
TxtTelorGoreng.Text = ""
TxtMieRebus.Text = ""
TxtSingkongRebus.Text = ""
TxtUbiRebus.Text = ""
End Sub
Private Sub TxtNama_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles TxtNama.TextChanged
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label1.Click
End Sub
Private Sub TxtAyamBakar_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TxtAyamBakar.TextChanged
End Sub
End Class

También podría gustarte