internal void MailDeleteChange(DeleteChange 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 removed [last target was " + MailSender.TransformTargetToString(change.TargetBefore) + "]"); bodyAppendix.AppendLine("COMMENT: " + change.Comment); mailMessage.Add(bodyAppendix.ToString()); }
protected void ApplyDeleteChange(DeleteChange change, Changeset changeset, Int32 changeId, Int32 changesetId, IDataManager manager) { var changeInfo = new BasketPortfolioSecurityTargetChangeInfo( changeId, changeset.BasketId, change.PortfolioId, change.SecurityId, change.TargetBefore, null, changesetId, change.Comment ); manager.InsertBasketPortfolioSecurityTargetChange(changeInfo); manager.DeleteBasketPortfolioSecurityTarget(changeset.BasketId, change.PortfolioId, change.SecurityId); }
public void Resolve(DeleteChange change) { this.applier.MailDeleteChange(change, this.manager, this.securityRepository, this.mail, this.username, this.date); }
public void Resolve(DeleteChange change) { this.applier.ApplyDeleteChange(change, changeset, changeId, changesetId, manager); }