domingo, 23 de diciembre de 2012

Ejercicio 42

“Capturar datos de un producto incluyendo su cantidad en existencia, un panel que despliegue una orden de compra si la cantidad en existencia del producto es menor que el punto de reorden, o si el origen del producto es nacional. ”
' Gambas class file
PUBLIC SUB Button1_Click()
DIM A, B, C, F, G, X, Y, Z AS Integer
DIM D, E AS String
A = TextBox1.Text
B = TextBox5.Text
Z = TextBox4.Text
X = TextBox3.Text
Y = X * Z
C = TextBox1.Text
D = TextBox2.Text
E = ComboBox1.Text
F = TextBox4.Text
G = TextBox5.Text
IF A < B THEN
Orden.TextLabel1.Text = C
Orden.TextLabel2.Text = D
Orden.TextLabel3.Text = E
Orden.TextLabel4.Text = F
Orden.TextLabel5.Text = G
Orden.TextLabel6.Text = Y
Producto. Hide
Orden. Show
ELSE
IF ComboBox1.Text = "NACIONAL" THEN
Orden.TextLabel1.Text = C
Orden.TextLabel2.Text = D
Orden.TextLabel3.Text = E
Orden.TextLabel4.Text = F
Orden.TextLabel5.Text = G
Orden.TextLabel6.Text = Y
Orden.TextLabel6.Text = Y
Producto. Hide
Orden. Show
ELSE
IF A < B THEN
Orden.TextLabel1.Text = C
Orden.TextLabel2.Text = D
Orden.TextLabel3.Text = E
Orden.TextLabel4.Text = F
Orden.TextLabel5.Text = G
Orden.TextLabel6.Text = Y
Orden.TextLabel6.Text = Y
Producto. Hide
Orden. Show
ELSE
IF A < B THEN
Orden.TextLabel1.Text = C
Orden.TextLabel2.Text = D
Orden.TextLabel3.Text = E
Orden.TextLabel4.Text = F
Orden.TextLabel5.Text = G
Orden.TextLabel6.Text = Y
orden.TextLabel6.Text = Y
Producto. Hide
Orden. Show
ELSE
Message("NO ES NACIONAL Y NO HAY MAS EN REORDEN")
ENDIF
ENDIF
ENDIF
ENDIF
END
PUBLIC SUB Button2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
ComboBox1.Text = ""
END
PUBLIC SUB Button3_Click()
MenuS.Show
Producto. Hide
END

“DATOS DEL PRODUCTO”
' Gambas class file
PUBLIC SUB Button1_Click()
Producto. Show
Orden. Hide
END
PUBLIC SUB Label1_MouseDown()
END

No hay comentarios:

Publicar un comentario