public CurrentMarketFromGeolocation(IMarketService marketService, ICommerceGeolocationService commerceGeolocationService)
 {
     MarketService   = marketService;
     DefaultMarketId = marketService.GetAllMarkets().FirstOrDefault(x => x.IsEnabled)?.MarketId ??
                       new MarketId("DEFAULT");
     CommerceGeolocationService = commerceGeolocationService;
 }
Example #2
0
 public DemoHeaderViewModelFactory(LocalizationService localizationService,
                                   IAddressBookService addressBookService,
                                   ICustomerService customerService,
                                   CartViewModelFactory cartViewModelFactory,
                                   IUrlResolver urlResolver,
                                   IMarketService marketService,
                                   ICurrentMarket currentMarket,
                                   IBookmarksService bookmarksService,
                                   ICartService cartService,
                                   CustomerContext customerContext,
                                   IContentCacheKeyCreator contentCacheKeyCreator,
                                   IContentLoader contentLoader,
                                   CmsHeaderViewModelFactory cmsHeaderViewModelFactory) :
     base(localizationService,
          addressBookService,
          customerService,
          cartViewModelFactory,
          urlResolver,
          marketService,
          currentMarket,
          bookmarksService,
          cartService,
          contentCacheKeyCreator,
          contentLoader)
 {
     _customerService           = customerService;
     _customerContext           = customerContext;
     _cmsHeaderViewModelFactory = cmsHeaderViewModelFactory;
 }
 private void SetMainService(IMarketService service)
 {
     foreach (var kv in _services)
     {
         _services[kv.Key] = kv.Key.GetType().Name == service.GetType().Name;
     }
 }
Example #4
0
 public UserController(UserManager <Seller> userManager, SignInManager <Seller> signInManager, IMarketService marketService, ILogger <UserController> logger)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _marketService = marketService;
     _logger        = logger;
 }
Example #5
0
 public MarketController(IMarketService marketService, ICurrentMarket currentMarket, UrlResolver urlResolver, LanguageService languageService)
 {
     _marketService = marketService;
     _currentMarket = currentMarket;
     _urlResolver = urlResolver;
     _languageService = languageService;
 }
 public CheckoutController(
     ICurrencyService currencyService,
     ControllerExceptionHandler controllerExceptionHandler,
     IOrderRepository orderRepository,
     CheckoutViewModelFactory checkoutViewModelFactory,
     ICartService cartService,
     OrderSummaryViewModelFactory orderSummaryViewModelFactory,
     IRecommendationService recommendationService,
     CheckoutService checkoutService,
     OrderValidationService orderValidationService,
     IDatabaseMode databaseMode,
     ISwedbankPayCheckoutService swedbankPayCheckoutService,
     IContentLoader contentLoader,
     IMarketService marketService,
     IAddressBookService addressBookService)
 {
     _currencyService            = currencyService;
     _controllerExceptionHandler = controllerExceptionHandler;
     _orderRepository            = orderRepository;
     _checkoutViewModelFactory   = checkoutViewModelFactory;
     _cartService = cartService;
     _orderSummaryViewModelFactory = orderSummaryViewModelFactory;
     _recommendationService        = recommendationService;
     _checkoutService            = checkoutService;
     _orderValidationService     = orderValidationService;
     _databaseMode               = databaseMode;
     _swedbankPayCheckoutService = swedbankPayCheckoutService;
     _contentLoader              = contentLoader;
     _marketService              = marketService;
     _addressBookService         = addressBookService;
 }
Example #7
0
        private static ApiResult InvokeApi(IMarketService service, string methodName, object[] arguments)
        {
            var host = ManagerCore.Instance.ApiHostManager.GetFastHost(service.GetType());

            service.Connect(host);
            var method = service.GetType().GetMethod(methodName);

            if (method == null)
            {
                throw new Exception("没有找到接口" + methodName);
            }
            var result = (ApiResult)method.Invoke(service, arguments);

            if (!string.IsNullOrEmpty(result.Error))
            {
                //尝试一次登录
                if (result.Error.Contains("连接已断开"))
                {
                    service.Disconnet();
                    service.Connect(host);
                    result = (ApiResult)method.Invoke(service, arguments);
                }
            }
            return(result);
        }
Example #8
0
 public MarketController(IMarketService marketService, IProductService productServise, IUserProductService userProductService, ITutorialService tutroialService)
 {
     _marketService = marketService;
     _productService = productServise;
     _userProductService = userProductService;
     _tutorialService = tutroialService;
 }
Example #9
0
        public void Setup()
        {
            var mockHttp = new MockHttpMessageHandler();
            var client   = mockHttp.ToHttpClient();

            var stockMarketAPI  = new StockMarketAPI(client);
            var stockMarketData = new StockMarketData(stockMarketAPI);

            TestHelpers.MockStockData(mockHttp);
            TestHelpers.MockFondData(mockHttp);
            TestHelpers.MockBondData(mockHttp);

            TestHelpers.MockDividendData(mockHttp);
            TestHelpers.MockCouponsData(mockHttp);

            var context = TestHelpers.GetMockFinanceDbContext();

            TestHelpers.SeedOperations1(context);

            _financeDataService = new FinanceDataService(context);
            var assetFactory   = new AssetsFactory(_financeDataService, stockMarketData);
            var balanceService = new BalanceService(_financeDataService);

            _marketService    = new MarketService(_financeDataService, assetFactory, balanceService);
            _portfolioService = new PortfolioService(_financeDataService, balanceService, assetFactory);
        }
 public CartService(
     IProductService productService,
     IPricingService pricingService,
     IOrderGroupFactory orderGroupFactory,
     CustomerContextFacade customerContext,
     IPlacedPriceProcessor placedPriceProcessor,
     IInventoryProcessor inventoryProcessor,
     ILineItemValidator lineItemValidator,
     IOrderRepository orderRepository,
     IPromotionEngine promotionEngine,
     IAddressBookService addressBookService,
     ICurrentMarket currentMarket,
     ICurrencyService currencyService,
     IPromotionService promotionService,
     ILineItemCalculator lineItemCalculator,
     IMarketService marketService)
 {
     _productService       = productService;
     _pricingService       = pricingService;
     _orderGroupFactory    = orderGroupFactory;
     _customerContext      = customerContext;
     _placedPriceProcessor = placedPriceProcessor;
     _inventoryProcessor   = inventoryProcessor;
     _lineItemValidator    = lineItemValidator;
     _promotionEngine      = promotionEngine;
     _orderRepository      = orderRepository;
     _addressBookService   = addressBookService;
     _currentMarket        = currentMarket;
     _currencyService      = currencyService;
     _promotionService     = promotionService;
     _lineItemCalculator   = lineItemCalculator;
     _marketService        = marketService;
 }
        public DeliveryReceipt(PurchaseOrder purchaseOrder)
        {
            if (purchaseOrder == null)
            {
                throw new ArgumentNullException("purchaseOrder cannot be null");
            }

            _purchaseOrder  = purchaseOrder;
            _orderViewModel = new OrderViewModel(_purchaseOrder);

            To = _orderViewModel.Email;

            var            localizationService = ServiceLocator.Current.GetInstance <LocalizationService>();
            ICurrentMarket currentMarket       = ServiceLocator.Current.GetInstance <ICurrentMarket>();
            IMarketService marketService       = ServiceLocator.Current.GetInstance <IMarketService>();
            IMarket        market = GetMarketForOrder(purchaseOrder, marketService, currentMarket);

            string emailSubject = localizationService.GetStringByCulture("/common/receipt/email/subject", market.DefaultLanguage);

            Subject             = string.Format(emailSubject, _purchaseOrder.TrackingNumber);
            BackendOrderNumber  = _orderViewModel.ErpOrderNumber;
            PurchaseOrderNumber = _purchaseOrder.TrackingNumber;

            // Get first shipment tracking number
            if (_purchaseOrder.OrderForms != null &&
                _purchaseOrder.OrderForms.Count > 0 &&
                _purchaseOrder.OrderForms[0].Shipments != null &&
                _purchaseOrder.OrderForms[0].Shipments.Count > 0)
            {
                TrackingNumber = _purchaseOrder.OrderForms[0].Shipments[0].ShipmentTrackingNumber;
            }
        }
Example #12
0
 public DebugController(IPopupService popupService, ICountryRepository countryRepository, ICongressVotingService congressVotingService,
                        ICongressVotingRepository congressVotingRepository, IBattleService battleService, IBattleRepository battleRepository,
                        ICompanyService companyService, IWalletService walletService, IMarketService marketService, IEquipmentService equipmentService,
                        ITransactionScopeProvider transactionScopeProvider, ICompanyRepository companyRepository, IEquipmentRepository equipmentRepository,
                        IHotelRepository hotelRepository, IMahService mahService, IHouseService houseService, IHouseRepository houseRepository,
                        HouseDayChangeProcessor houseDayChangeProcessor) : base(popupService)
 {
     this.countryRepository        = countryRepository;
     this.congressVotingService    = congressVotingService;
     this.congressVotingRepository = congressVotingRepository;
     this.battleService            = battleService;
     this.battleRepository         = battleRepository;
     this.companyService           = companyService;
     this.walletService            = walletService;
     this.marketService            = marketService;
     this.equipmentService         = equipmentService;
     this.transactionScopeProvider = transactionScopeProvider;
     this.companyRepository        = companyRepository;
     this.equipmentRepository      = equipmentRepository;
     this.hotelRepository          = hotelRepository;
     this.mahService              = mahService;
     this.houseService            = houseService;
     this.houseRepository         = houseRepository;
     this.houseDayChangeProcessor = houseDayChangeProcessor;
 }
Example #13
0
 public ViewModelFactory(IMediator mediator, IMenuSettings menuSettings, IMarketService marketService, ICurrentMarket currentMarket)
 {
     _mediator      = mediator;
     _menuSettings  = menuSettings;
     _marketService = marketService;
     _currentMarket = currentMarket;
 }
Example #14
0
 public MarketController(IMarketService marketService, ICurrentMarket currentMarket, UrlResolver urlResolver, LanguageService languageService)
 {
     _marketService   = marketService;
     _currentMarket   = currentMarket;
     _urlResolver     = urlResolver;
     _languageService = languageService;
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            _marketService = ServiceLocator.Current.GetInstance <IMarketService>();
            _checkoutConfigurationLoader = ServiceLocator.Current.GetInstance <ICheckoutConfigurationLoader>();

            if (IsPostBack || _paymentMethodDto?.PaymentMethodParameter == null)
            {
                return;
            }

            var markets = _paymentMethodDto.PaymentMethod.First().GetMarketPaymentMethodsRows();

            if (markets == null || markets.Length == 0)
            {
                pnl_marketselected.Visible = true;
                pnl_parameters.Visible     = false;
                return;
            }



            var market = _marketService.GetMarket(markets.First().MarketId);
            var checkoutConfiguration = GetConfiguration(market.MarketId, _paymentMethodDto.PaymentMethod.First().LanguageId);

            BindConfigurationData(checkoutConfiguration);
            BindMarketData(markets);
        }
        private void ConfigurePaymentMethod(IMarketService marketService)
        {
            var allMarkets = marketService.GetAllMarkets().Where(x => x.IsEnabled).ToList();

            foreach (var language in allMarkets.SelectMany(x => x.Languages).Distinct())
            {
                var paymentMethodDto = PaymentManager.GetPaymentMethodBySystemName("Stripe", language.TwoLetterISOLanguageName, true);
                if (paymentMethodDto != null && paymentMethodDto.PaymentMethod.Any())
                {
                    continue;
                }

                AddPaymentMethod(Guid.NewGuid(),
                                 "Stripe Credit card",
                                 "Stripe",
                                 "Stripe Credit card payment",
                                 "Mediachase.Commerce.Orders.CreditCardPayment, Mediachase.Commerce",
                                 "EPiServer.Commerce.Payment.Stripe.StripeGateway,EPiServer.Commerce.Payment.Stripe",
                                 true,
                                 1,
                                 allMarkets,
                                 language,
                                 paymentMethodDto);
            }
        }
Example #17
0
 public DataViewModel(ISellerProvider sellerProvider, IItemsProvider itemsProvider, IMarketService dataService, IItemReader itemReader)
 {
     _dataService = dataService;
     _itemReader  = itemReader;
     Sellers      = new ObservableCollection <SellerViewModel>(sellerProvider.Sellers);
     Items        = itemsProvider.Items;
 }
Example #18
0
        public static void Add(IService service)
        {
//			if (Framework.Installation.Edition == Edition.Research && (int)service.Id != 1)
//				return;
            ServiceManager.services.Add(service);
            ServiceManager.Load(service);
            service.StatusChanged += new EventHandler(ServiceManager.EmitServiceStatusChanged);
            service.Error         += new ServiceErrorEventHandler(ServiceManager.EmitServiceError);
            if (service is IMarketService)
            {
                IMarketService marketService = service as IMarketService;
                marketService.Logon  += new FIXLogonEventHandler(ServiceManager.EmitLogon);
                marketService.Logout += new FIXLogoutEventHandler(ServiceManager.EmitLogout);
            }
            if (service is IExecutionService)
            {
                IExecutionService executionService = service as IExecutionService;
                ServiceManager.executionServices.Add(executionService);
                executionService.NewOrderSingle            += new FIXNewOrderSingleEventHandler(ServiceManager.nKWRNT2TM);
                executionService.OrderCancelRequest        += new FIXOrderCancelRequestEventHandler(ServiceManager.NdSXrHt2W);
                executionService.OrderCancelReplaceRequest += new FIXOrderCancelReplaceRequestEventHandler(ServiceManager.iHPj7xf9A);
            }
            if (ServiceManager.ServiceAdded != null)
            {
                ServiceManager.ServiceAdded(typeof(ServiceManager), new ServiceEventArgs(service));
            }
        }
Example #19
0
        public static AllPortfoliosReport GetAllPortfoliosReport(int userId, IMarketService marketService,
                                                                 IBalanceService balanceService, IAggregatePortfolioService aggregatePortfolioService)
        {
            var allCostResult = aggregatePortfolioService.AggregateCost(new[] { 1, 2 }, userId).Result;
            var allCost       = FinanceHelpers.GetPriceDouble(allCostResult.Result);

            var paperProfitResult =
                aggregatePortfolioService.AggregatePaperProfit(new[] { 1, 2 }, userId).Result.Result;
            var allPaperProfit        = FinanceHelpers.GetPriceDouble(paperProfitResult.Value);
            var allPaperProfitPercent = paperProfitResult.Percent;

            var paymentProfitResult =
                aggregatePortfolioService.AggregatePaymentProfit(new[] { 1, 2 }, userId).Result.Result;
            var allPaymentProfit        = FinanceHelpers.GetPriceDouble(paymentProfitResult.Value);
            var allPaymentProfitPercent = paymentProfitResult.Percent;

            var allInvestSum = FinanceHelpers.GetPriceDouble(balanceService.GetAggregateInvestSum(new [] { 1, 2 }, userId));

            var balanceResult = balanceService.AggregateBalance(new[] { 1, 2 }, userId).Result;
            var allBalance    = FinanceHelpers.GetPriceDouble(balanceResult.Result);

            return(new AllPortfoliosReport()
            {
                AllCost = allCost,
                AllPaperProfit = allPaperProfit,
                AllPaperProfitPercent = allPaperProfitPercent,
                AllPaymentProfit = allPaymentProfit,
                AllPaymentProfitPercent = allPaymentProfitPercent,
                AllInvestSum = allInvestSum,
                AllUserBalance = allBalance
            });
        }
Example #20
0
 public CheckoutController(
     ICurrencyService currencyService,
     ControllerExceptionHandler controllerExceptionHandler,
     IOrderRepository orderRepository,
     CheckoutViewModelFactory checkoutViewModelFactory,
     ICartService cartService,
     OrderSummaryViewModelFactory orderSummaryViewModelFactory,
     IRecommendationService recommendationService,
     CheckoutService checkoutService,
     IKlarnaPaymentsService klarnaPaymentsService,
     IKlarnaCheckoutService klarnaCheckoutService,
     IContentLoader contentLoader,
     IMarketService marketService)
 {
     _currencyService            = currencyService;
     _controllerExceptionHandler = controllerExceptionHandler;
     _orderRepository            = orderRepository;
     _checkoutViewModelFactory   = checkoutViewModelFactory;
     _cartService = cartService;
     _orderSummaryViewModelFactory = orderSummaryViewModelFactory;
     _recommendationService        = recommendationService;
     _checkoutService       = checkoutService;
     _klarnaPaymentsService = klarnaPaymentsService;
     _klarnaCheckoutService = klarnaCheckoutService;
     _contentLoader         = contentLoader;
     _marketService         = marketService;
 }
 public DefaultOmniumOrderFactory(
     IShippingCalculator shippingCalculator,
     IMarketService marketService,
     CultureResolver cultureResolver,
     ITaxUtility taxUtility,
     ReferenceConverter referenceConverter,
     IContentRepository contentRepository,
     IPaymentManagerFacade paymentManagerFacade,
     ILineItemCalculator lineItemCalculator,
     IOrderFormCalculator orderFormCalculator,
     IOrderGroupCalculator orderGroupCalculator,
     IShipmentManagerFacade shipmentManagerFacade,
     IPromotionEngine promotionEngine)
 {
     _shippingCalculator    = shippingCalculator;
     _marketService         = marketService;
     _cultureResolver       = cultureResolver;
     _taxUtility            = taxUtility;
     _referenceConverter    = referenceConverter;
     _contentRepository     = contentRepository;
     _paymentManagerFacade  = paymentManagerFacade;
     _lineItemCalculator    = lineItemCalculator;
     _orderFormCalculator   = orderFormCalculator;
     _orderGroupCalculator  = orderGroupCalculator;
     _shipmentManagerFacade = shipmentManagerFacade;
     _promotionEngine       = promotionEngine;
 }
Example #22
0
 public AdminController(IAdminService adminService,
     IUserService userService,
     IBanService banService,
     IBuildingService buildingService,
     IQueueService queueService,
     IUserBuildingService userBuildingService,
     IUserProductService userProductService,
     IMapService mapService,
     IMarketService marketService,
     IDolarService dolarService,
     IDealService dealService,
     INotificationService notificationService,
     IProductService productService,
     IMessageService messageService,
     IProductRequirementsService productRService)
 {
     _adminService = adminService;
     _userService = userService;
     _banService = banService;
     _buildingService = buildingService;
     _queueService = queueService;
     _userBuildingService = userBuildingService;
     _userProductService = userProductService;
     _mapService = mapService;
     _marketService = marketService;
     _dolarService = dolarService;
     _dealService = dealService;
     _notificationService = notificationService;
     _productService = productService;
     _messageService = messageService;
     _productRService = productRService;
 }
Example #23
0
 public ModeTestRule(
     IMarketService marketService,
     IPushOverNotificationService pushOverNotificationService)
 {
     _marketService = marketService;
     _pushOverNotificationService = pushOverNotificationService;
 }
 public CollocationController(IMarketService iMarketService, ICollocationService iCollocationService, IProductService iProductService)
 {
     _iMarketService      = iMarketService;
     settings             = _iMarketService.GetServiceSetting(MarketType.Collocation);
     _iProductService     = iProductService;
     _iCollocationService = iCollocationService;
 }
Example #25
0
 public CalculateAverageSequenceRule(
     IStorageService storageService,
     IMarketService marketService)
 {
     _storageService = storageService;
     _marketService  = marketService;
 }
Example #26
0
 private void SetMainService(IMarketService service)
 {
     foreach (var kv in _services)
     {
         _services[kv.Key] = kv.Key.GetType().Name == service.GetType().Name;
     }
 }
 public SellersViewModelProvider(IMarketService service, IItemsProvider itemsProvider)
 {
     Sellers = new[] { new AllSellerViewModel(itemsProvider) }
     .Concat(
         service.Sellers
         .Select(s => new SellerViewModel(s, itemsProvider))
         .ToList());
 }
 public EmailService(INotificationSettingsRepository notificationSettingsRepository, IEmailDispatcher emailDispatcher, ICurrentMarket currentMarket, IContentLoader contentLoader, IMarketService marketService)
 {
     _notificationSettingsRepository = notificationSettingsRepository;
     _emailDispatcher = emailDispatcher;
     _currentMarket = currentMarket;
     _contentLoader = contentLoader;
     _marketService = marketService;
 }
 public MarketRequestManager(ISysUserBalanceDetailService sysUserBalanceDetailService,
                             ISysUserBalanceService sysUserBalanceService,
                             IMarketService marketService)
 {
     mSysUserBalanceService       = sysUserBalanceService;
     mSysUserBalanceDetailService = sysUserBalanceDetailService;
     mMarketService = marketService;
 }
Example #30
0
 public EmailService(INotificationSettingsRepository notificationSettingsRepository, IEmailDispatcher emailDispatcher, ICurrentMarket currentMarket, IContentLoader contentLoader, IMarketService marketService)
 {
     _notificationSettingsRepository = notificationSettingsRepository;
     _emailDispatcher = emailDispatcher;
     _currentMarket   = currentMarket;
     _contentLoader   = contentLoader;
     _marketService   = marketService;
 }
 protected IMarket GetMarketForOrder(PurchaseOrder purchaseOrder, IMarketService marketService, ICurrentMarket currentMarket)
 {
     if (purchaseOrder.MarketId != null && purchaseOrder.MarketId.Value != null)
     {
         return(marketService.GetMarket(purchaseOrder.MarketId));
     }
     return(currentMarket.GetCurrentMarket());
 }
Example #32
0
 public CurrentMarket(IMarketService marketService,
                      CookieService cookieService,
                      ICustomerService customerService)
 {
     _marketService   = marketService;
     _cookieService   = cookieService;
     _customerService = customerService;
 }
 public AllPortfoliosReport GetAllPortfoliosReport(
     [CurrentUserIdGlobalState] int userId,
     [Service] IMarketService marketService,
     [Service] IBalanceService balanceService,
     [Service] IAggregatePortfolioService aggregatePortfolioService)
 {
     return(QueryGetters.GetAllPortfoliosReport(userId, marketService, balanceService, aggregatePortfolioService));
 }
Example #34
0
 public MarketApiController(
     IMarketService marketService,
     ILogger <MarketApiController> logger
     )
 {
     _marketService = marketService;
     _logger        = logger;
 }
        public MarketOfferViewModel(Entity entity, MarketOfferModel offer, IMarketService marketService, bool deleteable = false, bool showDetails = false)
        {
            var cost = marketService.GetOfferCost(offer, entity, 1);

            initEntityless(offer, deleteable, showDetails, cost);

            initSelf(offer, entity, marketService, cost);
        }
 public PromotionService(
     IPricingService pricingService, 
     IMarketService marketService, 
     IContentLoader contentLoader, 
     ReferenceConverter referenceConverter,
     ILineItemCalculator lineItemCalculator,
     IPromotionEngine promotionEngine)
 {
     _contentLoader = contentLoader;
     _marketService = marketService;
     _pricingService = pricingService;
     _referenceConverter = referenceConverter;
     _lineItemCalculator = lineItemCalculator;
     _promotionEngine = promotionEngine;
 }
Example #37
0
 public PromotionService(
     IPricingService pricingService, 
     IMarketService marketService, 
     IContentLoader contentLoader, 
     ReferenceConverter referenceConverter, 
     PromotionHelperFacade promotionHelper,
     IPromotionEntryService promotionEntryService)
 {
     _contentLoader = contentLoader;
     _marketService = marketService;
     _pricingService = pricingService;
     _referenceConverter = referenceConverter;
     _promotionEntryService = promotionEntryService;
     _promotionHelper = promotionHelper;
 }
 private static ApiResult InvokeApi(IMarketService service, string methodName, object[] arguments)
 {
     var host = ManagerCore.Instance.ApiHostManager.GetFastHost(service.GetType());
     service.Connect(host);
     var method = service.GetType().GetMethod(methodName);
     if (method == null)
     {
         throw new Exception("没有找到接口" + methodName);
     }
     var result = (ApiResult)method.Invoke(service, arguments);
     if (!string.IsNullOrEmpty(result.Error))
     {
         //尝试一次登录
         if (result.Error.Contains("连接已断开"))
         {
             service.Disconnet();
             service.Connect(host);
             result = (ApiResult)method.Invoke(service, arguments);
         }
     }
     return result;
 }
Example #39
0
 public OfficeController(IUserBuildingService userBuildingService,
     IMarketService marketService,
     IUserProductService userProductService,
     INotificationService notificationService,
     IProductRequirementsService productRequirementService,
     IBuildingHelper buildingsHelper,
     IProductService productService,
     IMapService mapService,
     IUserService userService,
     IDealService dealService,
     ITutorialService tutorialService)
 {
     _userBuildingService = userBuildingService;
     _userProductService = userProductService;
     _marketService = marketService;
     _notificationService = notificationService;
     _dealService = dealService;
     _buildingsHelper = buildingsHelper;
     _productService = productService;
     _mapService = mapService;
     _userService = userService;
     _productRequirementService = productRequirementService;
     _tutorialService = tutorialService;
 }
 protected IMarket GetMarketForOrder(PurchaseOrderModel purchaseOrder, IMarketService marketService, ICurrentMarket currentMarket)
 {
     if (purchaseOrder.MarketId != null && purchaseOrder.MarketId.Value != null)
     {
         return marketService.GetMarket(purchaseOrder.MarketId);
     }
     return currentMarket.GetCurrentMarket();
 }
Example #41
0
 public Home()
 {
     InitializeComponent();
     marketService = DependencyResolver.Get<IMarketService>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CurrentMarketProfile"/> class.
 /// </summary>
 /// <param name="marketService">The market service.</param>
 public CurrentMarketProfile(IMarketService marketService)
 {
     _marketService = marketService;
 }
Example #43
0
 public MyPriceService(ICatalogSystem catalogSystem, IChangeNotificationManager changeManager, ISynchronizedObjectInstanceCache objectInstanceCache, CatalogKeyEventBroadcaster broadcaster, IApplicationContext applicationContext)
 {
     _marketService = ServiceLocator.Current.GetInstance<IMarketService>();
     _referenceConverter = ServiceLocator.Current.GetInstance<ReferenceConverter>();
 }
Example #44
0
		public MarketServiceEventArgs(IMarketService service) : base(service)
		{
		}
Example #45
0
 public CompanyController(IDataService dataService)
 {
     this.marketService = MarketServiceFactory.CreateService();
     this.dataService = dataService;
 }
Example #46
0
		public LogonEventArgs(IMarketService service, FIXLogon logon) : base(service)
		{
			this.Logon = logon;
		}
        protected void Page_Load(object sender, EventArgs e)
        {
            this._marketRepository = ServiceLocator.Current.GetInstance<IMarketService>();
            this._priceService = ServiceLocator.Current.GetInstance<IPriceService>();

            ErrorPanel.Visible = false;

            if (!IsPostBack)
            {
                BindMarkets();
                BindPriceTypes();
            }
        }
Example #48
0
 public MarketController()
 {
     _service = MarketServiceFactory.CreateService();
 }
Example #49
0
 public CurrentMarket(IMarketService marketService, CookieService cookieService)
 {
     _marketService = marketService;
     _cookieService = cookieService;
 }
Example #50
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MarketStorage"/> class.
 /// </summary>
 /// <param name="marketService">The market service.</param>
 public MarketStorage(IMarketService marketService)
 {
     _marketService = marketService;
 }
Example #51
0
 public static void injectService(IMarketService _service)
 {
     service = _service;
 }
Example #52
0
 public void set_up()
 {
     _loanCalculator = new LoanCalculator();
     _lenderRepository = new StubLenderRepository();
     _loanRequestValidator = new LoanRequestValidator(15000, 1000, 100);
     _marketService = new MarketService(_lenderRepository, _loanCalculator, _loanRequestValidator);
 }
Example #53
0
		public LogoutEventArgs(IMarketService service, FIXLogout logout) : base(service)
		{
			this.logout = logout;
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="CurrentMarketFromStartPage"/> class.
 /// </summary>
 /// <param name="marketService">The market service.</param>
 /// <param name="contentLoader">The content loader</param>
 public CurrentMarketFromStartPage(IMarketService marketService, IContentLoader contentLoader)
 {
     _marketService = marketService;
     _contentLoader = contentLoader;
 }