public StocksController(
     IStockService stockService
 )
 {
     StockService = stockService;
     ActiveUserService = new ActiveUserService();
 }
 public StockOverviewViewModel(IStockService stockService, StockListViewModel stockListViewModel, StockDetailViewModel stockDetailViewModel)
 {
     this.stockService = stockService;
     this.stockListViewModel = stockListViewModel;
     this.stockListViewModel.PropertyChanged += this.StockListPropertyChanged;
     this.stockDetailViewModel = stockDetailViewModel;
 }
 /// <summary>
 /// 初始化股票接口,并注册相关事件。
 /// </summary>
 void InitStockService()
 {
     StockService = StockServiceFactory.CreateStockService();
     //注册登录通知事件
     StockService.OnLoginAuth += new EventHandler<LoginAuthEventArgs>(StockService_OnLoginAuth);
     //注册补5分钟数据事件
     StockService.OnRcv5Minute += new EventHandler<Rcv5MinuteEventArgs>(StockService_OnRcv5Minute);
     //注册收到基本资料事件
     StockService.OnRcvBase += new EventHandler<RcvBaseEventArgs>(StockService_OnRcvBase);
     //注册补历史日线数据事件
     StockService.OnRcvHistory += new EventHandler<RcvHistoryEventArgs>(StockService_OnRcvHistory);
     //注册补分钟数据事件
     StockService.OnRcvMinute += new EventHandler<RcvMinuteEventArgs>(StockService_OnRcvMinute);
     //注册接收到新闻资料数据事件。
     StockService.OnRcvNew += new EventHandler<RcvNewEventArgs>(StockService_OnRcvNew);
     //注册接收到除权数据事件
     StockService.OnRcvPower += new EventHandler<RcvPowerEventArgs>(StockService_OnRcvPower);
     //注册接收到行情数据事件
     StockService.OnRcvReport += new EventHandler<RcvReportEventArgs>(StockService_OnRcvReport);
     //注册接收到财务数据事件
     StockService.OnRcvSTKFin += new EventHandler<RcvSTKFinEventArgs>(StockService_OnRcvSTKFin);
     //注册接收到证券代码表事件
     StockService.OnRcvSTKLabel += new EventHandler<RcvSTKLabelEventArgs>(StockService_OnRcvSTKLabel);
     //注册接收到分笔数据事件
     StockService.OnRcvSTKTick += new EventHandler<RcvSTKTickEventArgs>(StockService_OnRcvSTKTick);
 }
        public StockListViewModel(IStockService stockService)
        {
            IList<StockEntry> stockEntries = stockService.GetStockList();
            IEnumerable<StockListItemModel> stockListItemModels = ConvertToItemModels(stockEntries);

            this.searchText = "*";
            this.StockList = new ObservableCollection<StockListItemModel>(stockListItemModels);
            this.searchStockCommand = new SearchStockCommand(stockService, () => this.CanSearch, this.FilterStocklist);
        }
Example #5
0
 public StockGateway(IStockService stockService, 
     ModelToViewModelMapper modelToViewModelMapper, ViewModelToModelMapper viewModelToModelMapper,
     GatewayCache cache)
 {
     Guard.AgainstNull(() => stockService, () => modelToViewModelMapper, () => viewModelToModelMapper, () => cache);
     _stockService = stockService;
     _modelToViewModelMapper = modelToViewModelMapper;
     _viewModelToModelMapper = viewModelToModelMapper;
     _cache = cache;
 }
        public MainForm(IStockService stockService)
            : this()
        {
            _stockService = stockService;
            _configInfo = _stockService.GetConfigEntity();

            ModifyComponent();
            InitializeEvent();
            InitStockData();
        }
Example #7
0
        public GetStockDetails(string symbol, Future<StockDetailModel> detailModel, IStockService stockService)
        {
            if (string.IsNullOrEmpty(symbol))
            {
                throw new ArgumentNullException("symbol");
            }

            this.symbol = symbol;
            this.detailModel = detailModel;
            this.stockService = stockService;
        }
        public StockMaintanceViewModel(IProductService productService, IStockService stockService)
        {
            _productService = productService;
            _stockService = stockService;

            Categories = new List<Category>(_productService.GetCategories());

            SelectedCategory = Categories.FirstOrDefault();

            Timestamp = DateTime.Now;
        }
 public StockTransactionsController(
     IPurchaseTransactionService purchaseTransactionService,
     ISellTransactionService sellTransactionService,
     IBrokerageAccountService brokerageAccountService,
     IStockService stockService
 )
 {
     PurchaseTransactionService = purchaseTransactionService;
     SellTransactionService = sellTransactionService;
     BrokerageAccountService = brokerageAccountService;
     StockService = stockService;
     ActiveUserService = new ActiveUserService();
 }
Example #10
0
        public Service1()
        {
            InitializeComponent();

            var kernel = new StandardKernel();
            kernel.Load(Assembly.GetExecutingAssembly());
            _stockService = kernel.Get<IStockService>();

            eventLog = new EventLog();
            if (!EventLog.SourceExists("MySource"))
            {
                EventLog.CreateEventSource("MySource", "MyNewLog");
            }
            eventLog.Source = "MySource";
            eventLog.Log = "MyNewLog";
        }
Example #11
0
 public SalesController(ApplicationDbContext context, IStockService stockService)
 {
     _context      = context;
     _stockService = stockService;
 }
 public StockMarketController(ILogger <StockMarketController> logger, IStockService stockService)
 {
     _logger       = logger;
     _stockService = stockService;
 }
Example #13
0
 public JobReceiveQAPenaltyService(ApplicationDbContext db, IUnitOfWork _unitOfWork)
 {
     this.db       = db;
     _stockService = new StockService(_unitOfWork);
 }
 public StocksController(IStockService service)
 {
     _service = service;
 }
        public PackingHeaderController(IPackingHeaderService PackingHeaderService, IActivityLogService ActivityLogService, IStockService StockService, IUnitOfWork unitOfWork, IExceptionHandlingService exec)
        {
            _PackingHeaderService = PackingHeaderService;
            _ActivityLogService   = ActivityLogService;
            _StockService         = StockService;
            _unitOfWork           = unitOfWork;
            _exception            = exec;

            UserRoles = (List <string>)System.Web.HttpContext.Current.Session["Roles"];

            //Log Initialization
            LogVm.SessionId      = 0;
            LogVm.ControllerName = System.Web.HttpContext.Current.Request.RequestContext.RouteData.GetRequiredString("controller");
            LogVm.ActionName     = System.Web.HttpContext.Current.Request.RequestContext.RouteData.GetRequiredString("action");
            LogVm.User           = System.Web.HttpContext.Current.Request.RequestContext.HttpContext.User.Identity.Name;
        }
 private void InitializeInstances()
 {
     _business = new StockService(this);
     tlBookInDocket.DataSource = _booksInDocket;
 }
Example #17
0
 public Worker(ILogger <Worker> logger, IConfiguration config, IStockService stockService)
 {
     _logger       = logger;
     _config       = config;
     _stockService = stockService;
 }
Example #18
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="service"></param>
 /// <param name="productService"></param>
 public StockController(IStockService service, IInventoryService productService)
 {
     this._productService = productService;
     this._service        = service;
 }
Example #19
0
 public StockController(IStockService stockService)
 {
     _stockService = stockService;
 }
Example #20
0
 public ProductController(IStockService stockService)
 {
     _stockService = stockService;
 }
 public StockServiceTest(StockServiceTestFixture fixture)
 {
     this.fixture      = fixture;
     this.stockService = this.fixture.BootStrapper.GetContainer().Resolve <IStockService> ();
 }
 public ProductService(IStockService stockService, IBondService bondService)
 {
     this._StockService = stockService;
     this._BondService  = bondService;
 }
 public BusinessmanStocksViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IStockService stockService)
     : base(logProvider, navigationService)
 {
     _stockService = stockService;
     _stockService.CreatedStockEventHandler += StockServiceOnCreatedStockEventHandler;
 }
 public StockController(ApplicationDbContext context, IStockService service, IArticleService service_article)
 {
     _context        = context;
     _service        = service;
     _serviceArticle = service_article;
 }
Example #25
0
 public CommandHandler(IStockService stocks, IExchangeRepository exchangeRepository)
 {
     _stocks             = stocks;
     _exchangeRepository = exchangeRepository;
 }
        public StockAdministrationViewModel(ISession session, IProductService productService, IStockService stockService)
        {
            _session = session;
            _productService = productService;
            _stockService = stockService;

            #region Maintance - Products

            Actions.Add(new AdministrationActionViewModel()
            {
                Action = (p) =>
                                {
                                    IsBusy = true;

                                    Dispatcher.CurrentDispatcher.BeginInvoke((Action)delegate
                                    {
                                        View = new EditorView(_session);
                                        var _viewModel = new EditorViewModel<Product>(_session);
                                        _viewModel.ItemRemoved += (sender, e) =>
                                            {
                                                _session.Delete<Data.Models.Stock>(s => s.ProductId == e.Item.Id);
                                                _session.CommitChanges();
                                            };
                                        _viewModel.NewItemSaved += (sender, e) =>
                                            {
                                                _session.Add<Data.Models.Stock>(new Data.Models.Stock()
                                                            {
                                                                Id = Guid.NewGuid(),
                                                                ProductId = e.Item.Id,
                                                                Units = 0
                                                            });
                                                _session.CommitChanges();
                                            };
                                        View.DataContext = _viewModel;

                                        IsBusy = false;
                                    }, DispatcherPriority.Background);
                                },
                Category = "Maintance",
                Title = "Products"
            });

            #endregion

            #region Maintance - Tax

            Actions.Add(new AdministrationActionViewModel()
            {
                Action = (p) =>
                {
                    IsBusy = true;
                    Dispatcher.CurrentDispatcher.BeginInvoke((Action)delegate
                                                                         {
                                                                             View = new EditorView(_session);
                                                                             View.DataContext =
                                                                                 new EditorViewModel<Tax>(_session);

                                                                             IsBusy = false;
                                    }, DispatcherPriority.Background);
                },
                Category = "Maintance",
                Title = "Tax"
            });

            #endregion

            #region Maintance - Categories

            Actions.Add(new AdministrationActionViewModel()
            {
                Action = (p) =>
                {
                    IsBusy = true;
                    Dispatcher.CurrentDispatcher.BeginInvoke((Action)delegate
                                                                         {
                                                                             View = new EditorView(_session);
                                                                             View.DataContext =
                                                                                 new EditorViewModel<Category>(_session);

                                                                             IsBusy = false;
                                    }, DispatcherPriority.Background);
                },
                Category = "Maintance",
                Title = "Categories"
            });

            #endregion

            #region Maintance - Stock Maintance

            Actions.Add(new AdministrationActionViewModel()
            {
                Action = (p) =>
                {
                    IsBusy = true;
                    Dispatcher.CurrentDispatcher.BeginInvoke((Action)delegate
                                                                         {

                                                                             View = new StockMaintanceView_Main();
                                                                             View.DataContext =
                                                                                 new StockMaintanceViewModel(
                                                                                     _productService, _stockService);

                                                                             IsBusy = false;
                                    }, DispatcherPriority.Background);
                },
                Category = "Maintance",
                Title = "Stock Maintance"
            });

            #endregion

            #region Reports - Products

            Actions.Add(new AdministrationActionViewModel()
            {
                Action = (p) =>
                {
                    IsBusy = true;
                    Dispatcher.CurrentDispatcher.BeginInvoke((Action)delegate
                                                                         {

                                                                             ReportDocument reportDocument =
                                                                                 new ReportDocument();

                                                                             StreamReader reader =
                                                                                 new StreamReader(
                                                                                     new FileStream(
                                                                                         @"Templates\ProductsReport.xaml",
                                                                                         FileMode.Open, FileAccess.Read));
                                                                             reportDocument.XamlData =
                                                                                 reader.ReadToEnd();
                                                                             reportDocument.XamlImagePath =
                                                                                 Path.Combine(
                                                                                     Environment.CurrentDirectory,
                                                                                     @"Templates\");
                                                                             reader.Close();

                                                                             ReportData reportData = new ReportData();
                                                                             DataTable table = new DataTable("Products");
                                                                             table.Columns.Add("Reference",
                                                                                               typeof (string));
                                                                             table.Columns.Add("Name", typeof (string));
                                                                             table.Columns.Add("BuyPrice",
                                                                                               typeof (double));
                                                                             table.Columns.Add("SellPrice",
                                                                                               typeof (double));

                                                                             foreach (
                                                                                 var product in
                                                                                     _productService.GetProducts())
                                                                             {
                                                                                 table.Rows.Add(new object[]
                                                                                                    {
                                                                                                        product.Reference,
                                                                                                        product.Name,
                                                                                                        product.BuyPrice,
                                                                                                        product.SellPrice
                                                                                                    });
                                                                             }
                                                                             reportData.DataTables.Add(table);

                                                                             XpsDocument xps =
                                                                                 reportDocument.CreateXpsDocument(
                                                                                     reportData);

                                                                             View = new SimpleReportView(xps);

                                                                             IsBusy = false;
                                                                         }, DispatcherPriority.SystemIdle);
                },
                Category = "Reports",
                Title = "Products"
            });

            #endregion

            #region Reports - Current Inventory

            Actions.Add(new AdministrationActionViewModel()
            {
                Action = (p) =>
                {
                    IsBusy = true;
                    Dispatcher.CurrentDispatcher.BeginInvoke((Action)delegate
                                                                         {
                                                                             ReportDocument reportDocument =
                                                                                 new ReportDocument();

                                                                             StreamReader reader =
                                                                                 new StreamReader(
                                                                                     new FileStream(
                                                                                         @"Templates\CurrentInventoryReport.xaml",
                                                                                         FileMode.Open, FileAccess.Read));
                                                                             reportDocument.XamlData =
                                                                                 reader.ReadToEnd();
                                                                             reportDocument.XamlImagePath =
                                                                                 Path.Combine(
                                                                                     Environment.CurrentDirectory,
                                                                                     @"Templates\");
                                                                             reader.Close();

                                                                             ReportData reportData = new ReportData();
                                                                             DataTable table = new DataTable("Products");
                                                                             table.Columns.Add("Reference",
                                                                                               typeof (string));
                                                                             table.Columns.Add("Name", typeof (string));
                                                                             table.Columns.Add("Units", typeof (double));

                                                                             foreach (
                                                                                 var product in
                                                                                     _productService.GetProducts())
                                                                             {
                                                                                 Data.Models.Stock stock =
                                                                                     _stockService.GetStockByProductId(
                                                                                         product.Id);
                                                                                 table.Rows.Add(new object[]
                                                                                                    {
                                                                                                        product.Reference,
                                                                                                        product.Name,
                                                                                                        stock.Units
                                                                                                    });
                                                                             }
                                                                             reportData.DataTables.Add(table);

                                                                             XpsDocument xps =
                                                                                 reportDocument.CreateXpsDocument(
                                                                                     reportData);

                                                                             View = new SimpleReportView(xps);

                                                                             IsBusy = false;
                                                                         }, DispatcherPriority.SystemIdle);
                },
                Category = "Reports",
                Title = "Current Inventory"
            });

            #endregion
        }
Example #27
0
 public StocksController(IStockService entityService, IService <Calculation, Guid> calculationService)
     : base(entityService)
 {
     _calculationService = calculationService;
 }
Example #28
0
 public StockController(IStockService stockService,
     IMapper mapper)
 {
     _stockService = stockService;
     _mapper = mapper;
 }
Example #29
0
 public StocksLogic(IStockService stockService, ILogService logService)
 {
     _stockService = stockService;
     _logService   = logService;
 }
Example #30
0
 public override void SetUp()
 {
     base.SetUp();
     _stockService = (IStockService)_services.GetService(typeof(IStockService));
 }
Example #31
0
 public StoreController(IStoreService ILocationServices, IStockService IStockservice)
 {
     _IStoreServices = ILocationServices;
     _IStockservice  = IStockservice;
 }
Example #32
0
 public UpdateConsumer(IStockService stockService)
 {
     _stockServer = stockService;
 }
 private void InitializeInstances()
 {
     _business = new StockService(this);
 }
 public SettingsController(ISettingService settingService, IStockService stockService)
 {
     _settingService = settingService;
     _stockService   = stockService;
 }
 public GetStockValueByIntervalQueryHandler(IMapper mapper, IStockService service)
 {
     _service = service;
     _mapper  = mapper;
 }
Example #36
0
        public ProduitsController(IProduitService produitService, ILaboratoireService laboService, IStockService stockService)
        {
            this.produitService = produitService;

            this.laboService  = laboService;
            this.stockService = stockService;
        }
 public MyStockListViewModel(INavigationService navigationService, IStockService stockService)
 {
     _stockService      = stockService;
     _navigationService = navigationService;
 }
Example #38
0
 public StockRequestConsumer(IStockService stockService)
 {
     _stockService = stockService;
 }
Example #39
0
 public AnalyzeStocks(IStockService Stocks, ParseUsersStocks parseUsersStocks)
 {
     _stocks          = Stocks;
     ParseUsersStocks = parseUsersStocks;
 }
 public StockEntryService(ISalesUow uow, IClock clock, IStockService stockService)
 {
     _clock = clock;
     _stockService = stockService;
     Uow = uow;
 }
 public ReActiveStockController(ISystemService systemService, IStockService service)
 {
     _systemService = systemService;
     _service = service;
 }
Example #42
0
 public StocksController(IRepository <Stock> repository, AppDbContext dbContext, IStockService stockService)
 {
     _repository   = repository;
     _dbContext    = dbContext;
     _stockService = stockService;
 }
		public CMSInstaller(IStockService stockService, IUmbracoVersion umbracoVersion)
		{
			_stockService = stockService;
			_umbracoVersion = umbracoVersion;
		}
Example #44
0
 public AjaxController(ISystemService systemService, IStockService stockService)
 {
     _systemService = systemService;
     _stockService = stockService;
 }
Example #45
0
 public ConsoleAction(IStockService stockService, IExchangeService exchangeService)
 {
     this.stockService    = stockService;
     this.exchangeService = exchangeService;
 }
 public StocksDownloadService(IRepository<Quote> repository, IStockService stockService)
 {
     _repository = repository;
     _stockService = stockService;
 }
 public SearchStockCommand(IStockService stockService, Func<bool> canExecute, ApplyFilter applyFilter)
 {
     this.stockService = stockService;
     this.canExecute = canExecute;
     this.applyFilter = applyFilter;
 }