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)); } }
/// <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; }
/// <summary> /// Constructor /// </summary> /// <param name="playerSeason"></param> public OrderItem(PlayerSeason playerSeason) { this.PlayerSeason = playerSeason; _currentOrderItemTypeCode = OrderItemTypeCode.oitcProduct; _price = playerSeason.TemplateCurrent.MSRP; }