public RedirectToRouteResult PortfolioDeleteSymbol(PortfolioAddSymbolModel portfolio_add_symbol) { if (System.Web.HttpContext.Current.User.Identity.Name == portfolio_add_symbol.Username) { DashboardService.DeleteSymbolFromPortfolio(portfolio_add_symbol.Portfolio_Id, portfolio_add_symbol.Symbol_Id); } return(RedirectToAction("Index")); }
public PartialViewResult PortfolioAddSymbol(PortfolioAddSymbolModel portfolio_add_symbol) { if (System.Web.HttpContext.Current.User.Identity.Name == portfolio_add_symbol.Username) { string action_validation = ValidationService.ValidateUserSymbolCount(portfolio_add_symbol.Username, portfolio_add_symbol.Portfolio_Id); if (String.IsNullOrEmpty(action_validation)) { DashboardService.AddSymbolToPortfolio(portfolio_add_symbol.Portfolio_Id, portfolio_add_symbol.Symbol_Id); } else { ViewBag.ActionValidationError = action_validation; } } return(PartialView("~/Views/Dashboard/Partial/Watchlists.cshtml", new DashboardModel(System.Web.HttpContext.Current.User.Identity.Name, portfolio_add_symbol.Portfolio_Id))); }