/// <summary> /// Sets type of discounts which are being listed. /// </summary> private void SetDiscountType() { // Return Discount type var enumValueIndex = QueryHelper.GetInteger("type", 0); if (Enum.IsDefined(typeof(DiscountApplicationEnum), enumValueIndex)) { DiscountType = (DiscountApplicationEnum)enumValueIndex; } else { DiscountType = EnumHelper.GetDefaultValue <DiscountApplicationEnum>(); } }
/// <summary> /// Sets type of discounts which are being listed. /// </summary> private void SetDiscountType() { // Return Discount type var enumValueIndex = QueryHelper.GetInteger("type", 0); if (Enum.IsDefined(typeof(DiscountApplicationEnum), enumValueIndex)) { DiscountType = (DiscountApplicationEnum)enumValueIndex; } else { DiscountType = EnumHelper.GetDefaultValue<DiscountApplicationEnum>(); } }