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);
        }
Beispiel #4
0
 public static void ExecuteMethod_StoreObjects(StockCompany stockCompany)
 {
     stockCompany.StoreInformation();
 }
Beispiel #5
0
 public static void ExecuteMethod_SetFavouriteStatus(bool isFavourite, StockCompany stockCompany)
 {
     stockCompany.IsFavourite = isFavourite;
 }
Beispiel #6
0
 public static StockCompany GetTarget_StockCompany(string id)
 {
     return(StockCompany.RetrieveFromOwnerContent(InformationContext.Current.Owner, id));
 }
Beispiel #7
0
 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;
 }