hiya,
I have a piece of messy code that I wrote that I hope can be improved by using llblGenPro.
The code assigns a value to a label, depending on the quantity of stock avaliable.
if (products.qty<= 0) {
tdAmountOnHand.BgColor = "Red"; //inadequate stock levels
} else if (products.qty<= 5) {
tdAmountOnHand.BgColor = "Green"; //adequate stock levels
}
I can improve on this code slightly myself, but I was wondering, could LlbGenPro generate this logic if I created the correct objects in my database?
eg,could I add a "minimumAdequateStockLevel" field to my database so that I would not have to hard-code the numbers "0" and "5"?
ideally, I'd also like to be able to simply pass a "quantity" arg to an LlbGenPro generated object and have the correct "string" colour returned.
Is any of the above possible?
i hope the question made sense :-)
cheers,
yogi