Páginas
▼
lunes, 3 de octubre de 2011
Restaurante
Esta aplicación sirve para consultarl el Precio de la Venta Total Mas el Impuesto, según lo que haya consumido.
A continuacion la Programacion:
Private Sub Command1_Click()
Dim a, b, c, d, e, f, g, h, i, j As Integer
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
d = Val(Text4.Text)
e = Val(Text5.Text)
f = Val(Text6.Text)
g = Val(Text7.Text)
h = Val(Text8.Text)
i = (a * 2500) + (b * 4000) + (c * 3000) + (d * 1500) + (e * 2000) + (f * 1000) + (g * 1500) + (h * 1500)
Text9.Text = i
j = (i * 0.18)
Text10.Text = j
Text9.Text = (i + j)
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
MSHFlexGrid1.Cols = 2
MSHFlexGrid1.Rows = 9
MSHFlexGrid1.FixedCols = 0
MSHFlexGrid1.FixedRows = 1
MSHFlexGrid1.TextArray(0) = "Menú"
MSHFlexGrid1.TextArray(1) = "Precio"
MSHFlexGrid1.TextArray(2) = "Hamburguesa"
MSHFlexGrid1.TextArray(3) = "2.500"
MSHFlexGrid1.TextArray(4) = "Cerveza"
MSHFlexGrid1.TextArray(5) = "4.000"
MSHFlexGrid1.TextArray(6) = "Gaseosa"
MSHFlexGrid1.TextArray(7) = "3.000"
MSHFlexGrid1.TextArray(8) = "Ensalada"
MSHFlexGrid1.TextArray(9) = "1.500"
MSHFlexGrid1.TextArray(10) = "Salchichas"
MSHFlexGrid1.TextArray(11) = "2.000"
MSHFlexGrid1.TextArray(12) = "Refresco"
MSHFlexGrid1.TextArray(13) = "1.000"
MSHFlexGrid1.TextArray(14) = "Sopa"
MSHFlexGrid1.TextArray(15) = "1.500"
MSHFlexGrid1.TextArray(16) = "Postre"
MSHFlexGrid1.TextArray(17) = "1.500"
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text2.SetFocus
End If
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text3.SetFocus
End If
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text4.SetFocus
End If
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text5.SetFocus
End If
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text6.SetFocus
End If
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text7.SetFocus
End If
End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text8.SetFocus
End If
End If
End Sub
Private Sub Text8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text9.SetFocus
End If
End If
End Sub
Private Sub Text9_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text10.SetFocus
End If
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text11.SetFocus
End If
End If
End Sub

No hay comentarios:
Publicar un comentario