private void OnQueryPortfolioSuccessAction(PBPortfolioList PB) { //this.CreatePortfolios(); PortfolioVMCollection.Clear(); foreach (var portfolio in PB.Portfolio) { OnPortfolioUpdated(portfolio); OnPortfolioHedgeContracts(portfolio); } }
public void CreatePortfolio(string portfolio) { var portfolioList = new PBPortfolioList(); portfolioList.Portfolio.Add(new PBPortfolio { Name = portfolio }); MessageWrapper.SendMessage((uint)BusinessMessageID.MSG_ID_PORTFOLIO_NEW, portfolioList); }
public void CreatePortfolios(IEnumerable <PortfolioVM> portfolios) { var portfolioList = new PBPortfolioList(); foreach (var portfolio in portfolios) { portfolioList.Portfolio.Add(new PBPortfolio { Name = portfolio.Name, HedgeDelay = portfolio.Delay, Threshold = portfolio.Threshold }); } MessageWrapper.SendMessage((uint)BusinessMessageID.MSG_ID_PORTFOLIO_NEW, portfolioList); }