Exemplo n.º 1
0
 internal void MailUpdateChange(UpdateChange 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 + " of " + security.Name + "(" + security.ShortName + ") from " + MailSender.TransformTargetToString(change.TargetBefore) + " to " + MailSender.TransformTargetToString(change.TargetAfter));
     bodyAppendix.AppendLine("COMMENT: " + change.Comment);
     mailMessage.Add(bodyAppendix.ToString());
 }
Exemplo n.º 2
0
        protected void ApplyUpdateChange(UpdateChange change, Changeset changeset, Int32 changeId, Int32 changesetId, IDataManager manager)
        {
            var changeInfo = new BasketPortfolioSecurityTargetChangeInfo(
                changeId,
                changeset.BasketId,
                change.PortfolioId,
                change.SecurityId,
                change.TargetBefore,
                change.TargetAfter,
                changesetId,
				change.Comment
            );
            manager.InsertBasketPortfolioSecurityTargetChange(changeInfo);

            var info = new BasketPortfolioSecurityTargetInfo
            (
                changeset.BasketId,
                change.PortfolioId,
                change.SecurityId,
                change.TargetAfter,
                changeId
            );
            manager.UpdateBasketPortfolioSecurityTarget(info);
        }
Exemplo n.º 3
0
 public void Resolve(UpdateChange change)
 {
     this.applier.MailUpdateChange(change, this.manager, this.securityRepository, this.mail, this.username, this.date);
 }
Exemplo n.º 4
0
 public void Resolve(UpdateChange change)
 {
     this.applier.ApplyUpdateChange(change, changeset, changeId, changesetId, manager);
 }