public CheckPromotionResult CheckPromotionCode(string c, int orderId)
        {
            var isSameCode = false;
            var oldOrder   = _orderRepository.GetById(orderId);

            if (oldOrder != null)
            {
                if ((!string.IsNullOrEmpty(oldOrder.PromotionCode) && string.IsNullOrEmpty(c)) || (!string.IsNullOrEmpty(oldOrder.PromotionCode) && !string.IsNullOrEmpty(c) && oldOrder.PromotionCode == c))
                {
                    isSameCode = true;
                }
            }
            return(_promotionRepository.CheckPromotionCode(c, isSameCode));
        }
Exemple #2
0
 public CheckPromotionResult CheckPromotionCode(string c)
 {
     return(_promotionRepository.CheckPromotionCode(c, false));
 }