好的,代码是有效的..逻辑上没有任何问题,但让我告诉你..这是一段丑陋的代码..我正试图通过select来做这件事..情况,但看不到方法..
问题是,我需要激活通过任何OR得到的“警告”,但是,没有办法检测出哪些条件没有满足来指出它。
所以事情就是这样..如果有人能帮我清理一下我会很高兴的。
If (txt_nombre_plato.Text = "") Then
MsgBox("Completa el Nombre del Platillo")
valida_blanco = False
Else
If (txt_combo_sub_categoria_plato.Text = "CARNES") Or (txt_combo_sub_categoria_plato.Text = "MARISCOS") Or (txt_combo_sub_categoria_plato.Text = "PESCADOR") Or (txt_combo_sub_categoria_plato.Text = "PASTAS") Or (txt_combo_sub_categoria_plato.Text = "PIZZAS") Or (txt_combo_sub_categoria_plato.Text = "HAMBRUGESAS") Or (txt_combo_sub_categoria_plato.Text = "SOPAS") Or (txt_combo_sub_categoria_plato.Text = "BEBIDAS ALCOHOLICAS") Or (txt_combo_sub_categoria_plato.Text = "BEBIDAS SIN ALCOHOL") Or (txt_combo_sub_categoria_plato.Text = "POSTRES TORTAS") Or (txt_combo_sub_categoria_plato.Text = "MPOSTRES HELADOS") Then
MsgBox("Selecciona Sub-Categoria del Platillo")
valida_blanco = False
Else
If (txt_descripcion_plato.Text = "") Then
MsgBox("Coloca la descripción del Platillo")
valida_blanco = False
Else
If (txt_precio_plato.Text = "") Then
MsgBox("Coloca el precio del Platillo")
valida_blanco = False
Else
If (inflater_imagen = "") Then
MsgBox("Selecciona la imagen del Platillo")
valida_blanco = False
Else
If (chk_estado_contorno.Checked) And Lista_contorno.Items.Count = 0 Then MsgBox("Debes Agregar el contorno del Platillo", "Info") : valida_blanco = False
End If
End If
End If
End If
End If https://stackoverflow.com/questions/41421877
复制相似问题