ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Codigo


Enviado por   •  5 de Septiembre de 2015  •  Trabajos  •  1.880 Palabras (8 Páginas)  •  115 Visitas

Página 1 de 8

Public Class frmComidas

Private Sub btnOrdenar_Click(sender As System.Object, e As System.EventArgs) Handles btnOrdenar.Click

Dim vcant As Integer

Dim vcantR As Integer

Dim vsuma, vsumaR As Double 'acumulador de total a pagar

If chkPlatillo1.Checked = False And chkPlatillo2.Checked = False And chkPlatillo3.Checked = False And chkPlatillo4.Checked = False Then

MsgBox("Seleccione un platillo para poder ordenar", MsgBoxStyle.Critical, "Aviso")

Return

End If

If chkPlatillo1.Checked = True Then

Try

vcant = CInt(txtC1.Text)

Catch ex As Exception

MsgBox("La cantidad de hamburguesas es incorrecta, verifique su información", MsgBoxStyle.Critical, "Aviso")

Return

End Try

If rdbSi.Checked = True Then

Try

vcantR = CInt(txtC5.Text)

Catch ex As Exception

MsgBox("La cantidad de refrescos es incorrecta, verifique su información", MsgBoxStyle.Critical, "Aviso")

Return

End Try

vsuma = vcant * 15.8

vsumaR = vcantR * 5

txtPedido.Text = txtC1.Text & " " & chkPlatillo1.Text & vbCrLf

ElseIf rdbNo.Checked = True

vsuma = vcant * 15.8

Else rdbNo.Checked = False And rdbSi.Checked = False

MsgBox("Seleccione si desea refresco", MsgBoxStyle.Information, "Aviso")

End If

End If

If chkPlatillo2.Checked = True Then

Try

vcant = CInt(txtC2.Text)

Catch ex As Exception

MsgBox("La cantidad de tiras de pollo es incorrecta, verifique su información", MsgBoxStyle.Critical, "Aviso")

Return

End Try

If rdbSi.Checked = True Then

Try

vcantR = CInt(txtC5.Text)

Catch ex As Exception

MsgBox("La cantidad de refrescos es incorrecta, verifique su información", MsgBoxStyle.Critical, "Aviso")

Return

End Try

vsuma = vsuma + (vcant * 33)

vsumaR = vsumaR + (vcantR * 5)

txtPedido.Text = txtPedido.Text & txtC2.Text & " " & chkPlatillo2.Text & vbCrLf

ElseIf rdbNo.Checked = True

vsuma = vsuma + (vcant * 33)

Else rdbNo.Checked = False And rdbSi.Checked = False

MsgBox("Seleccione si desea refresco", MsgBoxStyle.Information,

...

Descargar como (para miembros actualizados)  txt (5 Kb)   pdf (42 Kb)   docx (12 Kb)  
Leer 7 páginas más »
Disponible sólo en Clubensayos.com