Exemplo n.º 1
0
        public void RemoveRule(DeleteRulePostData postData)
        {
            Campaign campaign = CampaignService.Instance.Get(postData.StoreId, postData.CampaignId);

            if (campaign == null)
            {
                return;
            }

            foreach (RuleGroup ruleGroup in campaign.RulesGroups)
            {
                if (ruleGroup.Rules.RemoveAll(r => r.Id == postData.RuleId) > 0)
                {
                    break;
                }
            }
            campaign.Save();
        }
        public void RemoveRule( DeleteRulePostData postData )
        {
            Campaign campaign = CampaignService.Instance.Get( postData.StoreId, postData.CampaignId );
              if ( campaign == null ) return;

              foreach ( RuleGroup ruleGroup in campaign.RulesGroups ) {
            if ( ruleGroup.Rules.RemoveAll( r => r.Id == postData.RuleId ) > 0 ) {
              break;
            }
              }
              campaign.Save();
        }