Пример #1
0
        public JsonResult GetCartProducts()
        {
            long num;

            num = (base.CurrentUser != null ? base.CurrentUser.Id : 0);
            ShoppingCartInfo cart           = (new CartHelper()).GetCart(num);
            IProductService  productService = ServiceHelper.Create <IProductService>();
            IShopService     shopService    = ServiceHelper.Create <IShopService>();
            var collection = cart.Items.Select((ShoppingCartItem item) => {
                ProductInfo product = productService.GetProduct(item.ProductId);
                ShopInfo shop       = shopService.GetShop(product.ShopId, false);
                if (shop == null)
                {
                    return(null);
                }
                SKUInfo sku = productService.GetSku(item.SkuId);
                return(new { cartItemId = item.Id, skuId = item.SkuId, id = product.Id, imgUrl = string.Concat(product.ImagePath, "/1_50.png"), name = product.ProductName, productstatus = product.SaleStatus, productauditstatus = product.AuditStatus, price = sku.SalePrice, Color = sku.Color, Size = sku.Size, Version = sku.Version, count = item.Quantity, shopId = shop.Id, shopName = shop.ShopName, productcode = product.ProductCode });
            }).Where((p) => p != null).OrderBy((s) => s.shopId);
            var variable = new { products = collection, amount = collection.Where((item) => {
                    if (item.productstatus != ProductInfo.ProductSaleStatus.OnSale)
                    {
                        return(false);
                    }
                    return(item.productauditstatus != ProductInfo.ProductAuditStatus.InfractionSaleOff);
                }).Sum((item) => item.price * item.count), totalCount = collection.Where((item) => {
                    if (item.productstatus != ProductInfo.ProductSaleStatus.OnSale)
                    {
                        return(false);
                    }
                    return(item.productauditstatus != ProductInfo.ProductAuditStatus.InfractionSaleOff);
                }).Sum((item) => item.count) };

            return(Json(variable));
        }
Пример #2
0
        public decimal GetNeedPayCashDepositByShopId(long shopId)
        {
            decimal              num    = new decimal(0, 0, 0, false, 2);
            IShopService         create = Instance <IShopService> .Create;
            IShopCategoryService shopCategoryService = Instance <IShopCategoryService> .Create;
            List <CategoryInfo>  list             = shopCategoryService.GetBusinessCategory(shopId).ToList();
            IEnumerable <long>   parentCategoryId =
                from item in list
                where item.ParentCategoryId == 0
                select item.Id;
            //decimal num1 = context.CategoryCashDepositInfo.FindBy((CategoryCashDepositInfo item) => parentCategoryId.Contains(item.CategoryId)).Max<CategoryCashDepositInfo, decimal>((CategoryCashDepositInfo item) => item.NeedPayCashDeposit);
            decimal         num1            = 1;
            CashDepositInfo cashDepositInfo = (
                from item in context.CashDepositInfo
                where item.ShopId == shopId
                select item).FirstOrDefault();

            if (cashDepositInfo != null && cashDepositInfo.CurrentBalance < num1)
            {
                num = num1 - cashDepositInfo.CurrentBalance;
            }
            if (cashDepositInfo == null)
            {
                num = num1;
            }
            return(num);
        }
Пример #3
0
 public OrderComplaintController(IOrderService iOrderService, IShopService iShopService, IComplaintService iComplaintService, ITypeService iTypeService)
 {
     _iOrderService     = iOrderService;
     _iShopService      = iShopService;
     _iComplaintService = iComplaintService;
     _iTypeService      = iTypeService;
 }
Пример #4
0
 public ProductController(IProductService productService, IOrderService orderService, IUserService userService, IShopService shopService)
 {
     _productService = productService;
     _orderService   = orderService;
     _userService    = userService;
     _shopService    = shopService;
 }
Пример #5
0
 public AbcPickupInStoreViewComponent(
     ILogger logger,
     IStoreContext storeContext,
     IWorkContext workContext,
     IPickStoreModelFactory pickStoreModelFactory,
     IProductService productService,
     IProductAttributeService productAttributeService,
     ICustomerShopService customerShopService,
     IShopService shopService,
     IShoppingCartService shoppingCartService,
     PickupInStoreSettings pickupInStoreSettings,
     StoreLocatorSettings storeLocatorSettings
     )
 {
     _logger                  = logger;
     _storeContext            = storeContext;
     _workContext             = workContext;
     _pickStoreModelFactory   = pickStoreModelFactory;
     _productService          = productService;
     _productAttributeService = productAttributeService;
     _customerShopService     = customerShopService;
     _shopService             = shopService;
     _shoppingCartService     = shoppingCartService;
     _pickupInStoreSettings   = pickupInStoreSettings;
     _storeLocatorSettings    = storeLocatorSettings;
 }
Пример #6
0
 public PurchaseController(IPurchaseService purchaseService, IShopService shopService, ICurrentUser currentUser, ICardService cardService)
 {
     _purchaseService = purchaseService;
     _shopService     = shopService;
     _currentUser     = currentUser;
     _cardService     = cardService;
 }
Пример #7
0
        public JsonResult ShareDish(int shopId, int recipesId)
        {
            IDishService    dish          = ServiceObjectContainer.Get <IDishService>();
            IRecipesService recipes       = ServiceObjectContainer.Get <IRecipesService>();
            IShopService    shop          = ServiceObjectContainer.Get <IShopService>();
            Shop            shopselect    = shop.GetShopInfoById(shopId).Data;
            Recipes         recipesselect = recipes.GetRecipesById(recipesId).Data;

            Dish dishmodel = new Dish();

            dishmodel.DishId      = Generation.GenerationId();
            dishmodel.Name        = "黑椒牛柳";
            dishmodel.Type        = Model.Enum.DishType.川菜.GetHashCode();
            dishmodel.MealTime    = Model.Enum.MealTime.午餐.GetHashCode();
            dishmodel.UpdateDate  = DateTime.Now;
            dishmodel.Image       = "";
            dishmodel.Description = "测试单品";
            dishmodel.ShopId      = shopselect.ShopId;
            dishmodel.ShopName    = shopselect.ShopName;

            DishShare share = new DishShare();

            share.DishInfo    = dishmodel;
            share.RecipesInfo = recipesselect;
            share.ShopInfo    = shopselect;

            return(Json(dish.ShareDishInfo(share)));
        }
 public PurchaseReturnController(IPurchaseReturnService PurchaseReturnService, IPurchaseReturnItemService PurchaseReturnItemService, IInwardFromSupplierService InwardFromSupplierService, IInwardItemFromSupplierService InwardItemFromSupplierService, IInwardFromShopToGodownService InwardFromShopToGodownService, IInwardItemFromShopToGodownService InwardItemFromShopToGodownService, IUserCredentialService UserCredentialService, IModuleService ModuleService,
                                 IUtilityService UtilityService, IShopStockService ShopStockService, IGodownStockService GodownStockService, IOpeningStockService OpeningStockService, IEntryStockItemService EntryStockItemService, IGodownService GodownService, IStockItemDistributionService StockItemDistributionService, IOutwardShopToGodownService OutwardShopToGodownService, IOutwardItemShopToGodownService OutwardItemShopToGodownService, ISuppliersMasterService SuppliersMasterService,
                                 IEmployeeMasterService EmployeeMasterService, IPurchaseInventoryTaxService PurchaseInventoryTaxService, IDebitNoteService DebitNoteService, IDebitNoteItemService DebitNoteItemService, IShopService ShopService)
 {
     this._PurchaseReturnService             = PurchaseReturnService;
     this._PurchaseReturnItemService         = PurchaseReturnItemService;
     this._InwardFromSupplierService         = InwardFromSupplierService;
     this._InwardItemFromSupplierService     = InwardItemFromSupplierService;
     this._InwardFromShopToGodownService     = InwardFromShopToGodownService;
     this._InwardItemFromShopToGodownService = InwardItemFromShopToGodownService;
     this._ModuleService                  = ModuleService;
     this._UserCredentialService          = UserCredentialService;
     this._UtilityService                 = UtilityService;
     this._ShopStockService               = ShopStockService;
     this._GodownStockService             = GodownStockService;
     this._OpeningStockService            = OpeningStockService;
     this._EntryStockItemService          = EntryStockItemService;
     this._GodownService                  = GodownService;
     this._StockItemDistributionService   = StockItemDistributionService;
     this._OutwardShopToGodownService     = OutwardShopToGodownService;
     this._OutwardItemShopToGodownService = OutwardItemShopToGodownService;
     this._SuppliersMasterService         = SuppliersMasterService;
     this._EmployeeMasterService          = EmployeeMasterService;
     this._PurchaseInventoryTaxService    = PurchaseInventoryTaxService;
     this._DebitNoteService               = DebitNoteService;
     this._DebitNoteItemService           = DebitNoteItemService;
     this._ShopService = ShopService;
 }
Пример #9
0
 public SwapDeliveryMethodController(
     IShoppingCartService shoppingCartService,
     ICustomerShopService customerShopService,
     IProductService productService,
     IBackendStockService backendStockService,
     IShopService shopService,
     IRepository <ShoppingCartItem> shoppingCartItemRepository,
     IRepository <ProductHomeDelivery> productHomeDeliveryRepository,
     IAttributeUtilities attributeUtilities,
     IWorkContext workContext,
     IUrlRecordService urlRecordService,
     IStoreContext storeContext
     )
 {
     _shoppingCartService           = shoppingCartService;
     _customerShopService           = customerShopService;
     _productService                = productService;
     _backendStockService           = backendStockService;
     _shopService                   = shopService;
     _shoppingCartItemRepository    = shoppingCartItemRepository;
     _productHomeDeliveryRepository = productHomeDeliveryRepository;
     _attributeUtilities            = attributeUtilities;
     _workContext                   = workContext;
     _urlRecordService              = urlRecordService;
     _storeContext                  = storeContext;
 }
Пример #10
0
 public HomeController(ILogger <HomeController> logger,
                       IShopService shopService, ICategoryService categoryService)
 {
     _logger          = logger;
     _shopService     = shopService;
     _categoryService = categoryService;
 }
Пример #11
0
 public GroceryItemController(IAuthService authService, IGroceryItemService grocceryItemService, IShopService shopService, IHubContext <GroceryItemHub> groceryItemHub, IHubContext <ShopHub> shopHub, IConfiguration config) : base(authService, config)
 {
     _grocceryItemService = grocceryItemService;
     _shopService         = shopService;
     _groceryItemHub      = groceryItemHub;
     _shopHub             = shopHub;
 }
Пример #12
0
        public CustomShoppingCartService(
            CatalogSettings catalogSettings,
            IAclService aclService,
            IActionContextAccessor actionContextAccessor,
            ICheckoutAttributeParser checkoutAttributeParser,
            ICheckoutAttributeService checkoutAttributeService,
            ICurrencyService currencyService,
            ICustomerService customerService,
            IDateRangeService dateRangeService,
            IDateTimeHelper dateTimeHelper,
            IGenericAttributeService genericAttributeService,
            ILocalizationService localizationService,
            IPermissionService permissionService,
            IPriceCalculationService priceCalculationService,
            IPriceFormatter priceFormatter,
            IProductAttributeParser productAttributeParser,
            IProductAttributeService productAttributeService,
            IProductService productService,
            IRepository <ShoppingCartItem> sciRepository,
            IShippingService shippingService,
            IStaticCacheManager staticCacheManager,
            IStoreContext storeContext,
            IStoreMappingService storeMappingService,
            IUrlHelperFactory urlHelperFactory,
            IUrlRecordService urlRecordService,
            IWorkContext workContext,
            OrderSettings orderSettings,
            ShoppingCartSettings shoppingCartSettings,
            // custom
            IAttributeUtilities attributeUtilities,
            IRepository <HiddenAttributeValue> hiddenAttributeValueRepository,
            ICustomerShopService customerShopService,
            IBackendStockService backendStockService,
            IShopService shopService
            )
            : base(catalogSettings, aclService, actionContextAccessor,
                   checkoutAttributeParser, checkoutAttributeService, currencyService,
                   customerService, dateRangeService, dateTimeHelper,
                   genericAttributeService, localizationService, permissionService,
                   priceCalculationService, priceFormatter, productAttributeParser,
                   productAttributeService, productService, sciRepository,
                   shippingService, staticCacheManager, storeContext, storeMappingService,
                   urlHelperFactory, urlRecordService, workContext, orderSettings,
                   shoppingCartSettings)
        {
            _hiddenAttributeValueRepository =
                EngineContext.Current.Resolve <IRepository <HiddenAttributeValue> >();

            _productAttributeParser  = productAttributeParser;
            _attributeUtilities      = attributeUtilities;
            _shoppingCartSettings    = shoppingCartSettings;
            _priceCalculationService = priceCalculationService;

            _customerShopService    = customerShopService;
            _attributeUtilities     = attributeUtilities;
            _backendStockService    = backendStockService;
            _shopService            = shopService;
            _productAttributeParser = productAttributeParser;
            _productService         = productService;
        }
Пример #13
0
 public PosEndPointController(IPosEndPointService posEndPointService, IShopService shopService, IUnityContainer unityContainer, LogHelper logger)
 {
     _posEndPointService = posEndPointService;
     _shopService        = shopService;
     _unityContainer     = unityContainer;
     _logger             = logger;
 }
Пример #14
0
 /// <summary>
 /// Hàm Khởi Tạo
 /// </summary>
 /// <param name="shopService"></param>
 /// <param name="districtService"></param>
 /// <param name="wardService"></param>
 /// <param name="cityService"></param>
 public ShopManagementController(IShopService shopService, IDistrictService districtService, IWardService wardService, ICityService cityService)
 {
     this.shopService     = shopService;
     this.districtService = districtService;
     this.wardService     = wardService;
     this.cityService     = cityService;
 }
Пример #15
0
        public JsonResult GetPlatFormCategory(long?key = null, int?level = -1)
        {
            int?nullable = level;

            if ((nullable.GetValueOrDefault() != -1 ? false : nullable.HasValue))
            {
                key = new long?(0);
            }
            if (!key.HasValue)
            {
                return(Json(new object[0]));
            }
            IEnumerable <CategoryInfo> categoryByParentId = ServiceHelper.Create <ICategoryService>().GetCategoryByParentId(key.Value);
            long?nullable1 = key;

            if ((nullable1.GetValueOrDefault() != 0 ? false : nullable1.HasValue))
            {
                IShopService shopService = ServiceHelper.Create <IShopService>();
                if (!(shopService.GetShop(base.CurrentSellerManager.ShopId, false) ?? new ShopInfo()).IsSelf)
                {
                    IQueryable <long> businessCategory =
                        from e in shopService.GetBusinessCategory(base.CurrentSellerManager.ShopId)
                        select e.CategoryId;
                    categoryByParentId = ServiceHelper.Create <ICategoryService>().GetTopLevelCategories(businessCategory);
                }
            }
            IEnumerable <KeyValuePair <long, string> > keyValuePair =
                from item in categoryByParentId
                select new KeyValuePair <long, string>(item.Id, item.Name);

            return(Json(keyValuePair));
        }
Пример #16
0
 public UpdateService(IShopService shopService, IBotService botService, ITrackingRepository trackingRepository, ITextConverter textConverter)
 {
     _shopService        = shopService ?? throw new ArgumentNullException(nameof(shopService));
     _botService         = botService ?? throw new ArgumentNullException(nameof(botService));
     _trackingRepository = trackingRepository ?? throw new ArgumentNullException(nameof(trackingRepository));
     _textConverter      = textConverter ?? throw new ArgumentNullException(nameof(textConverter));
 }
Пример #17
0
 public BenefitController(IBenefitService benefitService, IShopService shopService, IBenefitFileService benefitFileService, IBranchOfficeService branchOfficeService)
 {
     _benefitService      = benefitService;
     _shopService         = shopService;
     _benefitFileService  = benefitFileService;
     _branchOfficeService = branchOfficeService;
 }
Пример #18
0
 public OrderRefundController(IOrderService iOrderService, IRefundService iRefundService, IShopService iShopService, IVShopService iVShopService)
 {
     _iOrderService  = iOrderService;
     _iRefundService = iRefundService;
     _iShopService   = iShopService;
     _iVShopService  = iVShopService;
 }
Пример #19
0
 public GoodsApiController(IShopService shopService, ISettingsService settingsService, IShopGoodsReviewService shopGoodsReviewService, ILogService logService)
 {
     _shopService            = shopService;
     _settingsService        = settingsService;
     _shopGoodsReviewService = shopGoodsReviewService;
     _logService             = logService;
 }
Пример #20
0
 public MainWindow(IShopService shopService)
 {
     InitializeComponent();
     service = shopService;
     UpdateOrders(shopService);
     this.DataContext = Orders;
 }
Пример #21
0
 public LimitTimeBuyController(
     ILimitTimeBuyService iLimitTimeBuyService,
     ISlideAdsService iSlideAdsService,
     IShopService iShopService,
     IProductService iProductService,
     IProductDescriptionTemplateService iProductDescriptionTemplateService,
     IShopCategoryService iShopCategoryService,
     ICommentService iCommentService,
     IConsultationService iConsultationService,
     ICouponService iCouponService,
     ICashDepositsService iCashDepositsService, ITypeService iTypeService
     )
 {
     _iLimitTimeBuyService = iLimitTimeBuyService;
     _iSlideAdsService     = iSlideAdsService;
     _iShopService         = iShopService;
     _iProductService      = iProductService;
     _iProductDescriptionTemplateService = iProductDescriptionTemplateService;
     _iShopCategoryService = iShopCategoryService;
     _iCommentService      = iCommentService;
     _iConsultationService = iConsultationService;
     _iCouponService       = iCouponService;
     _iCashDepositsService = iCashDepositsService;
     _iTypeService         = iTypeService;
 }
Пример #22
0
        public bool CheckShopGrade(long shopId, long newId)
        {
            IShopService shopService     = ServiceHelper.Create <IShopService>();
            int          shopAllProducts = ServiceHelper.Create <IProductService>().GetShopAllProducts(shopId);
            long         shopSpaceUsage  = shopService.GetShopSpaceUsage(shopId);
            long         num             = (shopSpaceUsage > 0 ? shopSpaceUsage : 0);

            if (newId <= 0)
            {
                return(true);
            }
            ShopGradeInfo shopGrade = ServiceHelper.Create <IShopService>().GetShopGrade(newId);

            if (shopGrade == null)
            {
                return(true);
            }
            int productLimit = shopGrade.ProductLimit;

            if (productLimit >= shopAllProducts && shopGrade.ImageLimit >= num)
            {
                return(true);
            }
            return(false);
        }
 public DispatcherLayer(IShopAdminService shopAdminService, IBasketService basketService, IShopService shopService, IUserService userService)
 {
     _shopAdminService = shopAdminService;
     _basketService    = basketService;
     _shopService      = shopService;
     _userService      = userService;
 }
Пример #24
0
 public CartController(IProductService iProductService, IShopService iShopService, IVShopService iVShopService, IShopBranchService iShopBranchService)
 {
     _iProductService    = iProductService;
     _iShopService       = iShopService;
     _iVShopService      = iVShopService;
     _iShopBranchService = iShopBranchService;
 }
Пример #25
0
 public MemberController(
     IOrderService iOrderService,
     IMemberService iMemberService,
     IMemberCapitalService iMemberCapitalService,
     ICouponService iCouponService,
     IShopBonusService iShopBonusService,
     IVShopService iVShopService,
     IProductService iProductService,
     IShippingAddressService iShippingAddressService,
     IMessageService iMessageService,
     IMemberSignInService iMemberSignInService,
     IRefundService iRefundService,
     ICommentService iCommentService,
     IShopBranchService iShopBranchService,
     IShopService iShopService
     )
 {
     _iOrderService           = iOrderService;
     _iMemberService          = iMemberService;
     _iMemberCapitalService   = iMemberCapitalService;
     _iCouponService          = iCouponService;
     _iShopBonusService       = iShopBonusService;
     _iVShopService           = iVShopService;
     _iProductService         = iProductService;
     _iShippingAddressService = iShippingAddressService;
     _iMessageService         = iMessageService;
     _iMemberSignInService    = iMemberSignInService;
     _iRefundService          = iRefundService;
     _iCommentService         = iCommentService;
     _iShopBranchService      = iShopBranchService;
     _iShopService            = iShopService;
 }
Пример #26
0
        public JsonResult DishShare(Dish dish, int shopid, int recipeid)
        {
            IDishService    dishservice    = ServiceObjectContainer.Get <IDishService>();
            IRecipesService recipesservice = ServiceObjectContainer.Get <IRecipesService>();
            IShopService    shopservice    = ServiceObjectContainer.Get <IShopService>();
            Shop            shopselect     = shopservice.GetShopInfoById(shopid).Data;
            Recipes         recipesselect  = recipesservice.GetRecipesById(recipeid).Data;

            dish.DishId     = Generation.GenerationId();
            dish.UpdateDate = DateTime.Now;
            dish.ShopId     = shopselect.ShopId;
            dish.ShopName   = shopselect.ShopName;
            if (!string.IsNullOrEmpty(dish.Image))
            {
                int substringindex = dish.Image.LastIndexOf(',') + 1;
                dish.Image = dish.Image.Substring(substringindex, dish.Image.Length - substringindex);
            }



            DishShare share = new DishShare();

            share.DishInfo    = dish;
            share.RecipesInfo = recipesselect;
            share.ShopInfo    = shopselect;

            return(Json(dishservice.ShareDishInfo(share)));
        }
Пример #27
0
        bool addNew; //Перевірка чи додати чи видалити

        public OrderWindow(OrderDTO orderDTO, bool addNew, IShopService orderService)
        {
            InitializeComponent();
            this.addNew      = addNew;
            this.OrderDTO    = orderDTO;
            this.service     = orderService;
            this.addressDTOs = service.GetAddresses().ToList();
            this.clientDTOs  = service.GetClients().ToList();
            //this.productDTOs = service.ToList();


            cb_Client.ItemsSource  = clientDTOs;
            cb_Address.ItemsSource = addressDTOs;
            cb_Product.ItemsSource = productDTOs;



            //Якщо потрібно робити Update
            if (!addNew)
            {
                tb_Date.Text             = orderDTO.Date.ToString();
                tb_Count.Text            = orderDTO.Count.ToString();
                cb_Address.SelectedIndex = addressDTOs.FindIndex(x => x.Id == orderDTO.Id);
                cb_Product.SelectedIndex = productDTOs.FindIndex(x => x.Id == orderDTO.Id);
                cb_Client.SelectedIndex  = clientDTOs.FindIndex(x => x.Id == orderDTO.Id);
            }
        }
Пример #28
0
 public SecurityHelper(IMembershipService membershipService, IShopService shopService, IAccountService accountService, IDistributorService distributorService)
 {
     _membershipService  = membershipService;
     _shopService        = shopService;
     _accountService     = accountService;
     _distributorService = distributorService;
 }
Пример #29
0
 public ShopManagerController(IShopService shopService, IRustShopService rustShopService, UserManager <AppUser> userManager, IConfiguration configuration)
 {
     _shopService     = shopService;
     _rustShopService = rustShopService;
     _userManager     = userManager;
     _configuration   = configuration;
 }
Пример #30
0
        public ShopController(ISessionValueProviderService sessionService, IShopService shopService,
                              ISearchService searchService, IShopClientService clientService, IShopActionService shopActionService,
                              IShopCategoryService shopCategoryService, IShopManufacturerService shopManufacturerService,
                              IPrincipalResolver principalResolver, IHeartService heartService, IShopOrderService shopOrderService, IShopPickupPointService pickupPointService)
        {
            _sessionService          = sessionService;
            _shopService             = shopService;
            _searchService           = searchService;
            _clientService           = clientService;
            _shopActionService       = shopActionService;
            _shopCategoryService     = shopCategoryService;
            _shopManufacturerService = shopManufacturerService;
            _principalResolver       = principalResolver;
            _heartService            = heartService;
            _shopOrderService        = shopOrderService;
            _pickupPointService      = pickupPointService;


            var service = DependencyResolver.Current.GetService <IShopSettingsService>();

            try
            {
                var settings = service.GetShopSettings();
                _shopUrl = String.IsNullOrEmpty(settings.ShopUrl) ? "catalog" : settings.ShopUrl;
            }
            catch
            {
                _shopUrl = "catalog";
            }
        }
        public DeliveryEventsController()
        {
            assetTypes = new AssetTypeRepository(db);
            assets = new AssetRepository(db);
            orders = new OrderRepository(db);
            customers = new CustomerRepository(db);
            var events = new EventRepository(db);

            inventory = new InventoryService(assetTypes, assets, customers, orders, events);
            shop = new ShopService(orders, customers);
        }
Пример #32
0
        /// <summary>
        /// Initializes a new instance of the DispatchedShopService class
        /// </summary>
        /// <param name="wrappedService">the wrapped service</param>
        /// <param name="dispatcher">the thread dispatcher</param>
        public DispatchedShopService(IShopService wrappedService, Dispatcher dispatcher)
            : base(dispatcher)
        {
            if (wrappedService == null)
            {
                throw new ArgumentNullException("wrappedService");
            }

            this.wrappedService = wrappedService;

            this.wrappedService.GetShopDetailsCompleted += (s, e) => this.DispatchEvent(this.GetShopDetailsCompleted, s, e);
            this.wrappedService.GetFeaturedSellersCompleted += (s, e) => this.DispatchEvent(this.GetFeaturedSellersCompleted, s, e);
            this.wrappedService.GetShopsByNameCompleted += (s, e) => this.DispatchEvent(this.GetShopsByNameCompleted, s, e);
            this.wrappedService.GetShopListingsCompleted += (s, e) => this.DispatchEvent(this.GetShopListingsCompleted, s, e);
            this.wrappedService.GetFeaturedDetailsCompleted += (s, e) => this.DispatchEvent(this.GetFeaturedDetailsCompleted, s, e);
        }
Пример #33
0
 private void createServices()
 {
     timeService = new TimeService();
     eventService = new EventService();
     uiFactoryService = new UIFactoryService();
     wwwService = new FakeWwwService();//controller.GameObject.AddComponent<WwwService>();
     viewService = new ViewService(eventService, uiFactoryService);
     loadService = new LoadService(eventService);
     gameService = new GameService(pool, viewService);
     pathService = new PathService(pool, wwwService, eventService);
     levelService = new LevelService(wwwService, eventService);
     enemyService = new EnemyService(pool, wwwService, eventService);
     bonusService = new BonusService(pool, wwwService, eventService);
     difficultyService = new DifficultyService(pool, wwwService, eventService);
     infoService = new InfoService(viewService, uiFactoryService, eventService);
     settingsService = new SettingsService(pool);
     translationService = new TranslationService(settingsService);
     languageService = new LanguageService(wwwService, eventService);
     analyticsService = new AnalyticsService(settingsService);
     shipService = new ShipService(timeService, eventService);
     gamerService = new GamerService(eventService);
     currencyService = new CurrencyService(eventService, gamerService);
     iapService = new IAPService(eventService);
     adService = new AdService(currencyService);
     shopService = new ShopService(currencyService, eventService, iapService);
     updateables.Add(infoService);
 }
Пример #34
0
 /// <summary>
 /// Initializes a new instance of the ShopViewModel class 
 /// </summary>
 /// <param name="shopService">the shop service</param>
 public ShopViewModel(IShopService shopService)
 {
     this.shopService = shopService;
 }
 /// <summary>
 /// Initializes a new instance of the FeaturedSellersViewModel class.
 /// </summary>
 /// <param name="shopsService">the shopsService service</param>
 public FeaturedSellersViewModel(IShopService shopsService)
     : base(shopsService)
 {
     this.ShopService.GetFeaturedSellersCompleted += this.ShopsReceived;
     this.MakeCommands();
 }
Пример #36
0
 /// <summary>
 /// Initializes a new instance of the ShopsByNameViewModel class.
 /// </summary>
 /// <param name="shopsService">the shopsService service</param>
 public ShopsByNameViewModel(IShopService shopsService)
     : base(shopsService)
 {
     this.ShopService.GetShopsByNameCompleted += this.ShopsReceived;
     this.MakeCommands();
 }
 public ShopController(IShopService shopService, IUnitOfWork uow)
 {
     _shopService = shopService;
     _uow = uow;
 }