Пример #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());
 }
Пример #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);
        }
Пример #3
0
 public void Resolve(UpdateChange change)
 {
     this.applier.MailUpdateChange(change, this.manager, this.securityRepository, this.mail, this.username, this.date);
 }
Пример #4
0
 public void Resolve(UpdateChange change)
 {
     this.applier.ApplyUpdateChange(change, changeset, changeId, changesetId, manager);
 }