コード例 #1
0
        internal void MailInsertChange(InsertChange 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 [empty] to " + MailSender.TransformTargetToString(change.BaseValueAfter));
            bodyAppendix.AppendLine("COMMENT: " + change.Comment);
            mailMessage.Add(bodyAppendix.ToString());
        }
コード例 #2
0
        public void ApplyInsertChange(InsertChange change, Changeset changeset, Int32 changeId, Int32 changesetId, IDataManager manager)
        {
            var changeInfo = new TargetingTypeBasketBaseValueChangeInfo
                             (
                changeId,
                changeset.TargetingTypeId,
                change.BasketId,
                null,
                change.BaseValueAfter,
                changesetId,
                change.Comment
                             );

            manager.InsertTargetingTypeBasketBaseValueChange(changeInfo);

            var info = new TargetingTypeBasketBaseValueInfo(
                changeset.TargetingTypeId,
                change.BasketId,
                change.BaseValueAfter,
                changeId
                );

            manager.InsertTargetingTypeBasketBaseValue(info);
        }
コード例 #3
0
 public void Resolve(InsertChange change)
 {
     this.applier.ApplyInsertChange(change, this.changeset, this.changeId, this.changesetId, this.manager);
 }
コード例 #4
0
 public void Resolve(InsertChange change)
 {
     this.applier.MailInsertChange(change, this.manager, this.securityRepository, this.mail, this.username, this.date, this.ttName, this.basketRepository);
 }