public static void Execute(SetAlarmPriceOfStockCompanyParameters parameters) { PrepareParameters(parameters); StockCompany StockCompany = SetAlarmPriceOfStockCompanyImplementation.GetTarget_StockCompany(parameters.Id); SetAlarmPriceOfStockCompanyImplementation.ExecuteMethod_SetAlarmPrice(parameters.AlarmPrice, StockCompany); SetAlarmPriceOfStockCompanyImplementation.ExecuteMethod_StoreObjects(StockCompany); }
public static void Execute(SetFavouriteStatusOfStockCompanyParameters parameters) { PrepareParameters(parameters); StockCompany StockCompany = SetFavouriteStatusOfStockCompanyImplementation.GetTarget_StockCompany(parameters.Id); SetFavouriteStatusOfStockCompanyImplementation.ExecuteMethod_SetFavouriteStatus(parameters.IsFavourite, StockCompany); SetFavouriteStatusOfStockCompanyImplementation.ExecuteMethod_StoreObjects(StockCompany); }
public static void Execute(RemoveStockCompanyFromPortfolioParameters parameters) { PrepareParameters(parameters); Portfolio Portfolio = RemoveStockCompanyFromPortfolioImplementation.GetTarget_Portfolio(parameters.PortfolioId); StockCompany StockCompany = RemoveStockCompanyFromPortfolioImplementation.GetTarget_StockCompany(parameters.StockCompanyId); RemoveStockCompanyFromPortfolioImplementation.ExecuteMethod_RemoveStockCompanyFromPortfolio(Portfolio, StockCompany); RemoveStockCompanyFromPortfolioImplementation.ExecuteMethod_StoreObjects(Portfolio); }
public static void ExecuteMethod_StoreObjects(StockCompany stockCompany) { stockCompany.StoreInformation(); }
public static void ExecuteMethod_SetFavouriteStatus(bool isFavourite, StockCompany stockCompany) { stockCompany.IsFavourite = isFavourite; }
public static StockCompany GetTarget_StockCompany(string id) { return(StockCompany.RetrieveFromOwnerContent(InformationContext.Current.Owner, id)); }
public static void ExecuteMethod_AddStockCompanyToPortfolio(Portfolio portfolio, StockCompany stockCompany) { if (portfolio != null && portfolio.StockCompanies.CollectionContent.Count(x => x.ID == stockCompany.ID) == 0) { portfolio.StockCompanies.CollectionContent.Add(stockCompany); } }
public static void ExecuteMethod_RemoveStockCompanyFromPortfolio(Portfolio portfolio, StockCompany stockCompany) { var item = portfolio.StockCompanies.CollectionContent.FirstOrDefault(x => x.ID == stockCompany.ID); if (item != null) { portfolio.StockCompanies.CollectionContent.Remove(item); } }
public static void ExecuteMethod_SetAlarmPrice(double alarmPrice, StockCompany stockCompany) { stockCompany.PriceAlarm = alarmPrice; }