>Hi,
>In my app, item price is determined by couple of criteria, such as
>
>1. is it promotion item?
>2. is it sold to member?
>
>and etc
>
>I want the "correct" price shown immediately after user select from combobox. Am i break the 3-tier rules if I issue REPLACE price WITH xxxx in combobox.interactivechage? Any other better place to do these, in bizobj, .. ?
>
Why are you attempting to change the price at that point? It seems like you should have some kind of lookup function that would determine the correct price to display. Membership is a customer property, while promotional seems to be item specific, so I'd code it like the following:
oItem.GetPrice(ItemNumber, IsMember)
tPrice = v_Item.Price
IF This.IsOnPromotion(ItemNumber)
tPrice = tPrice * PromotionDiscount
ENDIF
IF IsMember
tPrice = tPrice * MembershipDiscount
ENDIF
RETURN tPrice
REPLACEing it there isn't a violation of n-tier. You're changing the UI layer representation, any real change will have to be passed back to the data store to be saved.