internal void MailInsertChange(InsertChange change, IDataManager dataManager, SecurityRepository securityRepository, List<String> mailMessage, String username, DateTime date)
 {
     StringBuilder bodyAppendix = new StringBuilder("\n");
     bodyAppendix.AppendLine("---" + date + ", Approved by: " + username + "---");
     var security = securityRepository.FindSecurity(change.SecurityId);
     bodyAppendix.AppendLine("Adjustment for Portfolio " + change.PortfolioId + ": " + security.Name + "(" + security.ShortName + ") was added to " + MailSender.TransformTargetToString(change.TargetAfter));
     bodyAppendix.AppendLine("COMMENT: " + change.Comment);
     mailMessage.Add(bodyAppendix.ToString());
 }
        protected void ApplyInsertChange(InsertChange change, Changeset changeset, Int32 changeId, Int32 changesetId, IDataManager manager)
        {
            var changeInfo = new BasketPortfolioSecurityTargetChangeInfo(
                changeId,
                changeset.BasketId,
                change.PortfolioId,
                change.SecurityId,
                null,
                change.TargetAfter,
                changesetId,
				change.Comment
            );
            manager.InsertBasketPortfolioSecurityTargetChange(changeInfo);

            var info = new BasketPortfolioSecurityTargetInfo(
                changeset.BasketId,
                change.PortfolioId,
                change.SecurityId,
                change.TargetAfter,
                changeId
            );
            manager.InsertBasketPortfolioSecurityTarget(info);
        }
 public void Resolve(InsertChange change)
 {
     this.applier.MailInsertChange(change, this.manager, this.securityRepository, this.mail, this.username, this.date);
 }
 public void Resolve(InsertChange change)
 {
     this.applier.ApplyInsertChange(change, changeset, changeId, changesetId, manager);
 }