Ejemplo n.º 1
0
        public void ApplyDeleteChange(DeleteChange change, Changeset changeset, Int32 changeId, Int32 changesetId, IDataManager manager)
        {
            var changeInfo = new TargetingTypeBasketBaseValueChangeInfo
                             (
                changeId,
                changeset.TargetingTypeId,
                change.BasketId,
                change.BaseValueBefore,
                null,
                changesetId,
                change.Comment
                             );

            manager.InsertTargetingTypeBasketBaseValueChange(changeInfo);
            manager.DeleteTargetingTypeBasketBaseValue(changeset.TargetingTypeId, change.BasketId);
        }
Ejemplo n.º 2
0
        internal void MailDeleteChange(DeleteChange change, IDataManager dataManager, SecurityRepository securityRepository, List <String> mailMessage, String username, DateTime date, String ttName, BasketRepository basketRepository)
        {
            StringBuilder bodyAppendix = new StringBuilder("\n");

            bodyAppendix.AppendLine("---" + date + ", Approved by: " + username + "---");
            var    basket     = basketRepository.GetBasket(change.BasketId);
            string basketName = "";

            if (basket.TryAsCountryBasket() != null)
            {
                basketName = basket.AsCountryBasket().Country.Name;
            }
            else
            {
                basketName = basket.AsRegionBasket().Name;
            }
            bodyAppendix.AppendLine("BASE Adjustment in " + basketName + " for " + ttName + " from " + MailSender.TransformTargetToString(change.BaseValueBefore) + " to [empty]");
            bodyAppendix.AppendLine("COMMENT: " + change.Comment);
            mailMessage.Add(bodyAppendix.ToString());
        }
Ejemplo n.º 3
0
 public void Resolve(DeleteChange change)
 {
     this.applier.ApplyDeleteChange(change, this.changeset, this.changeId, this.changesetId, this.manager);
 }
Ejemplo n.º 4
0
 public void Resolve(DeleteChange change)
 {
     this.applier.MailDeleteChange(change, this.manager, this.securityRepository, this.mail, this.username, this.date, this.ttName, this.basketRepository);
 }