3

My clients needs to have a functionality where for one product he has price for dealers, wholesale price, and retail price. And then users with role guests could see only retail price. Users with role wholesalers could see only wholesale price and dealers could see only dealers price. How can I achieve this.

4

2 回答 2

7

您可以使用可按用户角色应用的层级价格,无需任何自定义。确保添加数量设置为 1 的等级价格记录。

于 2013-09-09T13:37:40.020 回答
0

为每个产品在数据库中存储 3 个奖品,并根据角色检索和使用它。在代码中,您可以使用任何 2-Key Collection 来存储它。

句法 :

Dictionary<string, Dictionary<string, object>> ;

或者

IDictionary<Tuple<K1, K2>, V>
于 2013-09-09T11:54:45.353 回答