コード例 #1
0
        public static string GetTypeCodeString(OrderItemTypeCode type)
        {
            switch (type)
            {
            case OrderItemTypeCode.oitcPromoCodeDisc:
                return("Promo Code");

            case OrderItemTypeCode.oitcSalesTax:
                return("Sales Tax");

            case OrderItemTypeCode.oitcShipping:
                return("Shipping");

            case OrderItemTypeCode.oitcVolumeDiscount:
                return("Volume Discount");

            case OrderItemTypeCode.oitcWholesaleDisc:
                return("Wholesale Disc.");

            default:
                throw new ApplicationException(string.Format("Unknown order item type code specified: \"{0}\"", type));
            }
        }
コード例 #2
0
 /// <summary>
 /// Constructor for summary items
 /// </summary>
 /// <param name="typeCode"></param>
 /// <param name="quantity"></param>
 /// <param name="price"></param>
 public OrderItem(OrderItemTypeCode typeCode, int quantity, decimal price)
 {
     _currentOrderItemTypeCode = typeCode;
     _quantity = quantity;
     _price    = price;
 }
コード例 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="playerSeason"></param>
 public OrderItem(PlayerSeason playerSeason)
 {
     this.PlayerSeason         = playerSeason;
     _currentOrderItemTypeCode = OrderItemTypeCode.oitcProduct;
     _price = playerSeason.TemplateCurrent.MSRP;
 }