You are on page 1of 3

BILLING

Public paygtotal As Double

Private Sub txtcasht_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles txtcasht.TextChanged

paygtotal = lblrevpay.Text

If Val(txtcasht.Text) = 0 Then

lblrevchange.Text = ""

ElseIf Val(txtcasht.Text) - paygtotal < 0 Then

lblrevchange.ForeColor = Color.Red

lblrevchange.Text = Val(txtcasht.Text) - paygtotal

Else

lblrevchange.ForeColor = Color.Blue

lblrevchange.Text = Val(txtcasht.Text) - paygtotal

End If

End Sub

Private Sub btnpay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnpay.Click

If lblrevchange.ForeColor = Color.Red Then

MsgBox("Hoy way labot utang dere!!!", vbOKOnly + vbInformation, "WAY UTANGAY")

Else

frmreciept.Show()

For x = 0 To frmordering.lstitems.Items.Count - 1 Step 1

frmreciept.lstlistme.Items.Add(frmordering.lstsizes.Items(x))
frmreciept.lstflavor.Items.Add(frmordering.lstflavor.Items(x))

frmreciept.lstpriceme.Items.Add(frmordering.lstitems.Items(x))

Next

frmreciept.lblpayab.Text = lblrevpay.Text

frmreciept.lblcash.Text = Format(Val(txtcasht.Text), "₱ #,###.00")

frmreciept.lblchange.Text = Format(Val(lblrevchange.Text), "₱ #,###.00")

frmreciept.lblvate.Text = Format(paygtotal * 0.12, "₱ #,###.00")

frmreciept.lblname.Text = frmsec.txtuser.Text

frmreciept.lbldate.Text = Now

End If

FORM3

Dim x, y As Integer

For x = 0 To frmMain.lstuser.Items.Count - 1 Step 1

If txtuser.Text = frmMain.lstuser.Items(x) Then

y=x

Exit For

End If

Next

If txtuser.Text = "" Then

MsgBox("All Fields Are Required!", vbOKOnly + vbInformation, "Empty field")

ElseIf txtpass.Text = "" Then


MsgBox("Password is required!", vbOKOnly + vbInformation, "Empty field")

ElseIf txtpass.Text <> frmMain.lstpass.Items(y) Then

MsgBox("PLEASE! Use your own password", vbOKOnly + vbInformation, "failed")

Else

MsgBox("SUCCESSFULLY LOGED IN!", vbOKOnly + vbInformation, "success")

frmordering.Show()

Me.Hide()

frmordering.lblhello.Text = "hello " & txtuser.Text

End If

End Sub

Private Sub lnkregester_LinkClicked(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles lnkregester.LinkClicked

Me.Hide()

frmregistration.Show()

frmregistration.txtfirst.Text = ""

frmregistration.txtmiddle.Text = ""

frmregistration.txtlast.Text = ""

frmregistration.txtage.Text = ""

frmregistration.cbogender.Text = ""

frmregistration.txtuser.Text = ""

frmregistration.txtpass.Text = ""

frmregistration.txtconpass.Text = ""

frmregistration.txthint.Text = ""

End Sub

You might also like