/// <summary> /// shows all user stocks /// </summary> /// <returns></returns> public ActionResult Index() { PersonalizedViewModel vm = new PersonalizedViewModel(); var userName = User.Identity.Name; var user = _personalizedRepo.GetUser(userName); var userStocks = _personalizedRepo.GetStocksOfUser(user).Select(x => x.stockcode).ToList(); vm.stockSymbols = userStocks; return(View(vm)); }
public ActionResult Plan(string url) { PersonalizedViewModel viewModel; if (string.IsNullOrWhiteSpace(url)) { viewModel = new PersonalizedViewModel("Default"); } else if (personalizedSites.Any(s => s.Equals(url, StringComparison.CurrentCultureIgnoreCase))) { viewModel = new PersonalizedViewModel(url); } else { return(View("Error404")); } return(View(viewModel)); }
public ActionResult Index(string url) { string view; PersonalizedViewModel viewModel; if (string.IsNullOrWhiteSpace(url) || actions.Any(a => a.Equals(url, StringComparison.CurrentCultureIgnoreCase))) { view = url; viewModel = new PersonalizedViewModel("Default"); } else if (personalizedSites.Any(s => s.Equals(url, StringComparison.CurrentCultureIgnoreCase))) { view = "index"; viewModel = new PersonalizedViewModel(url); } else { return(View("Error404")); } return(View(view, viewModel)); }
/// <summary> /// shows all user stocks /// </summary> /// <returns></returns> public ActionResult Index() { PersonalizedViewModel vm = new PersonalizedViewModel(); var userName = User.Identity.Name; var user = _personalizedRepo.GetUser(userName); var userStocks = _personalizedRepo.GetStocksOfUser(user).Select(x => x.stockcode).ToList(); vm.stockSymbols = userStocks; return View(vm); }