public BrokerageAccountService(
     IBrokerageAccountRepository brokerageAccountRepository
 )
 {
     BrokerageAccountRepository = brokerageAccountRepository;
     ActiveUserService = new ActiveUserService();
 }
Ejemplo n.º 2
0
 public StocksController(
     IStockService stockService
 )
 {
     StockService = stockService;
     ActiveUserService = new ActiveUserService();
 }
 public BrokerageAccountsController(
     IBrokerageAccountService brokerageAccountService
 )
 {
     BrokerageAccountService = brokerageAccountService;
     ActiveUserService = new ActiveUserService();
 }
 public PurchaseTransactionService(
     IPurchaseTransactionRepository purchaseTransactionRepository
 )
 {
     PurchaseTransactionRepository = purchaseTransactionRepository;
     ActiveUserService = new ActiveUserService();
 }
 public MutualFundsController(
     IMutualFundService mutualFundService
 )
 {
     MutualFundService = mutualFundService;
     ActiveUserService = new ActiveUserService();
 }
 public SellTransactionService(
     IPurchaseTransactionRepository purchaseTransactionRepository,
     ISellTransactionRepository sellTransactionRepository
 )
 {
     PurchaseTransactionRepository = purchaseTransactionRepository;
     SellTransactionRepository = sellTransactionRepository;
     ActiveUserService = new ActiveUserService();
 }
 public StockTransactionsController(
     IPurchaseTransactionService purchaseTransactionService,
     ISellTransactionService sellTransactionService,
     IBrokerageAccountService brokerageAccountService,
     IStockService stockService
 )
 {
     PurchaseTransactionService = purchaseTransactionService;
     SellTransactionService = sellTransactionService;
     BrokerageAccountService = brokerageAccountService;
     StockService = stockService;
     ActiveUserService = new ActiveUserService();
 }
 public override void OnActionExecuting(ActionExecutingContext filterContext)
 {
     var activeUserService = new ActiveUserService();
     if (activeUserService.VerifyActiveUserSessionExists()) return;
     filterContext.Controller.TempData["flash"] =
         new List<FlashMessage> {
             new FlashMessage
                 {
                     Action = "Index",
                     Controller = "Home",
                     Area = "",
                     Message = "An active logged in user is required for the requested operation. Please log out and try again.",
                     Status = "error"
                 }
         };
     filterContext.HttpContext.Response.Redirect("/");
 }