/// <summary>
        /// Get All Inventory Items in the database
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult Get()
        {
            InventoryItemService InventoryItemService = CreateInventoryItemService();
            var inventoryItems = InventoryItemService.GetInventoryItem();

            return(Ok(inventoryItems));
        }
        private InventoryItemService CreateInventoryItemService()
        {
            var userId       = Guid.Parse(User.Identity.GetUserId());
            var stateService = new InventoryItemService(userId);

            return(stateService);
        }
Exemplo n.º 3
0
 public InventoryItemsVM(InventoryItemService inventoryService, MainWindowVM mainVM)
 {
     _inventoryService = inventoryService;
     _mainVM = mainVM;
     _saveInventoryItemsCommand = new Command(async () => await SaveInventoryItemsAsync());
     _loadInventoryItemsCommand = new Command(async () => await LoadInventoryItemsAsync());
 }
Exemplo n.º 4
0
 public OrderItemVM(OrderItemService service, InventoryItemService inventoryService, MainWindowVM mainVM)
     : base(service)
 {
     _mainVM           = mainVM;
     _shipCommand      = new Command(async() => await ShipAsync());
     _inventoryService = inventoryService;
 }
        public InventoryItemController(SCMSContext _context)
        {
            var optionBuilder = new DbContextOptions <SCMSContext>();

            _inventoryItemRepository = new InventoryItemRepository(_context);
            _inventoryItemService    = new InventoryItemService(_inventoryItemRepository);
        }
Exemplo n.º 6
0
 public CreateProductCommand(Product product, IProductDataProxy productDataProxy, InventoryItemService inventoryService, ITransactionContext transactionContext)
 {
     CurrentProduct      = product;
     _productDataProxy   = productDataProxy;
     _inventoryService   = inventoryService;
     _transactionContext = transactionContext;
 }
Exemplo n.º 7
0
 public async Task <IEnumerable <InventoryItem> > SearchInventoryItem(List <string> lst, List <string> includeLst = null)
 {
     using (var ctx = new InventoryItemService())
     {
         return(await ctx.GetInventoryItemsByExpressionLst(lst, includeLst).ConfigureAwait(false));
     }
 }
Exemplo n.º 8
0
 public ProductCatalogStructurePackage(BaseProductService baseProductService, ProductListService productListService,
                                       RelationshipTypeService relationshipTypeService, CategoryService categoryService,
                                       UnitOfMeasurementService unitOfMeasurementService, DataService dataService,
                                       FieldTemplateService fieldTemplateService,
                                       LanguageService languageService, VariantService variantService,
                                       InventoryService inventoryService,
                                       PriceListService priceListService,
                                       StructureInfoService structureInfoService,
                                       CurrencyService currencyService,
                                       FilterService filterService,
                                       InventoryItemService inventoryItemService,
                                       PriceListItemService priceListItemService,
                                       ProductListItemService productListItemService)
 {
     _baseProductService        = baseProductService;
     _categoryService           = categoryService;
     _dataService               = dataService;
     _fieldTemplateService      = fieldTemplateService;
     _languageService           = languageService;
     _variantService            = variantService;
     _inventoryService          = inventoryService;
     _priceListService          = priceListService;
     _structureInfoService      = structureInfoService;
     _currencyService           = currencyService;
     _filterService             = filterService;
     _productListService        = productListService;
     _relationshipTypeService   = relationshipTypeService;
     _unitOfMeasurementService  = unitOfMeasurementService;
     _bidirectionalRelationList = new List <ImportBidirectionalRelation>();
     _inventoryItemService      = inventoryItemService;
     _priceListItemService      = priceListItemService;
     _productListItemService    = productListItemService;
 }
Exemplo n.º 9
0
 public ShipOrderItemCommand(long orderItemID, IOrderItemDataProxy orderItemDataProxy, InventoryItemService inventoryService, ITransactionContext transactionContext)
 {
     _orderItemID        = orderItemID;
     _orderItemDataProxy = orderItemDataProxy;
     _inventoryService   = inventoryService;
     _transactionContext = transactionContext;
 }
Exemplo n.º 10
0
 public InventoryItemsVM(InventoryItemService inventoryService, MainWindowVM mainVM)
 {
     _inventoryService          = inventoryService;
     _mainVM                    = mainVM;
     _saveInventoryItemsCommand = new Command(async() => await SaveInventoryItemsAsync());
     _loadInventoryItemsCommand = new Command(async() => await LoadInventoryItemsAsync());
 }
Exemplo n.º 11
0
        private void ConfigureHttpClientUsage()
        {
            string hostSettingName = "apiHostNameAddress";
            var    baseAddress     = ConfigurationManager.AppSettings[hostSettingName];

            if (baseAddress == null)
            {
                throw new Exception($"The setting '{hostSettingName}' in the AppSettings portion of the configuration file was not found.");
            }

            var productsDataProxy   = new ProductsHttpServiceProxy(baseAddress);
            var inventoryDataProxy  = new InventoryItemsHttpServiceProxy(baseAddress);
            var customerDataProxy   = new CustomersHttpServiceProxy(baseAddress);
            var orderItemDataProxy  = new OrderItemsHttpServiceProxy(baseAddress);
            var orderRepository     = new OrdersHttpServiceProxy(baseAddress);
            var categoriesDataProxy = new CategoriesHttpServiceProxy(baseAddress);

            _inventoryService  = new InventoryItemService(inventoryDataProxy);
            _orderItemsService = new OrderItemClientService(orderItemDataProxy, productsDataProxy, inventoryDataProxy, new DTCTransactionContext());
            _ordersService     = new OrderService(orderRepository, _orderItemsService, new DTCTransactionContext());
            _customersService  = new CustomerService(customerDataProxy, _ordersService);
            _productsService   = new ProductClientService(productsDataProxy, orderRepository, _inventoryService, new DTCTransactionContext());
            _categoriesService = new CategoryService(categoriesDataProxy, productsDataProxy);
            this.DataContext   = new MainWindowVM(_eventAggregator, _customersService, _productsService, _categoriesService, _ordersService, _inventoryService);
        }
Exemplo n.º 12
0
        private async Task ImportInventory(List <CSVDataSummary> eslst)
        {
            var itmlst = from i in eslst
                         group i by i.ItemNumber.ToUpper()
                         into g
                         select new { ItemNumber = g.Key, g.FirstOrDefault().ItemDescription };

            using (var ctx = new InventoryItemService())
            {
                foreach (var item in itmlst)
                {
                    var i =
                        BaseDataModel.Instance.InventoryCache.GetSingle(
                            x => x.ItemNumber.ToUpper() == item.ItemNumber.ToUpper());

                    if (i == null)
                    {
                        i = new InventoryItem()
                        {
                            Description = item.ItemDescription,
                            ItemNumber  = item.ItemNumber
                        };
                        await ctx.CreateInventoryItem(i).ConfigureAwait(false);

                        BaseDataModel.Instance.InventoryCache.AddItem(i);
                    }
                }
            }
        }
Exemplo n.º 13
0
        private ICommand <Product> CreateCommand(Product product)
        {
            var productDataProxy   = new ProductRepository();
            var inventoryDataProxy = new InventoryItemRepository();
            var inventoryService   = new InventoryItemService(inventoryDataProxy);

            return(new CreateProductCommand(product, productDataProxy, inventoryService, new TransactionContextStub()));
        }
Exemplo n.º 14
0
 public OrderItemVM(OrderItem customer, OrderItemService service, InventoryItemService inventoryService, MainWindowVM mainVM)
     : base(customer, service)
 {
     _mainVM           = mainVM;
     _shipCommand      = new Command(async() => await ShipAsync());
     _inventoryService = inventoryService;
     CurrentProductID  = CurrentEntity.ProductID;
     CurrentCategoryID = _currentProduct.CurrentCategoryID;
     IsDirty           = false;
 }
Exemplo n.º 15
0
 public async Task SaveInventoryItem(InventoryItem i)
 {
     if (i == null)
     {
         return;
     }
     using (var ctx = new InventoryItemService())
     {
         await ctx.UpdateInventoryItem(i).ConfigureAwait(false);
     }
 }
Exemplo n.º 16
0
 public CustomerOrderWindow(OrderService orderService,
                            CustomerService customerService,
                            OrderItemService orderItemService,
                            InventoryItemService inventoryService,
                            MainWindowVM mainVM,
                            EventAggregator eventAggregator)
     : this()
 {
     var vm = new CustomerOrderVM(eventAggregator, orderService, orderItemService, inventoryService, mainVM);
     DataContext = vm;
 }
Exemplo n.º 17
0
 public OrderUtilities(
     CartAccessor cartAccessor,
     VariantService variantService,
     InventoryItemService inventoryItemService,
     IStockStatusCalculator stockStatusCalculator)
 {
     _stockStatusCalculator = stockStatusCalculator;
     _inventoryItemService  = inventoryItemService;
     _cartAccessor          = cartAccessor;
     _variantService        = variantService;
 }
        /// <summary>
        /// Delete an Inventory Item from the database
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IHttpActionResult Delete(int id)
        {
            InventoryItemService inventoryItemService = CreateInventoryItemService();
            var inventoryItems = inventoryItemService.DeleteInventoryItemById(id);

            if (inventoryItems == true)
            {
                return(Ok(inventoryItems));
            }
            return(InternalServerError());
        }
Exemplo n.º 19
0
        public CustomerOrderWindow(OrderService orderService,
                                   CustomerService customerService,
                                   OrderItemService orderItemService,
                                   InventoryItemService inventoryService,
                                   MainWindowVM mainVM,
                                   EventAggregator eventAggregator)
            : this()
        {
            var vm = new CustomerOrderVM(eventAggregator, orderService, orderItemService, inventoryService, mainVM);

            DataContext = vm;
        }
Exemplo n.º 20
0
        public ActionResult Index()
        {
            CorrolationIdHelper.SetCorrolationId(Guid.NewGuid());
            ServiceRequestWithData <ISingleSignOnToken, InventoryItemServiceGetAllParameters> parameters = new ServiceRequestWithData <ISingleSignOnToken, InventoryItemServiceGetAllParameters>
            {
                AuthenticationToken = GetAuthenticationToken(),
                Data = new InventoryItemServiceGetAllParameters()
            };

            ViewData.Model = InventoryItemService.GetAll(parameters).ResultData;
            return(View());
        }
Exemplo n.º 21
0
 public DeleteProductCommand(long productID, 
                             IProductDataProxy productDataProxy, 
                             InventoryItemService inventoryService, 
                             OrderService orderService,
                             ITransactionContext transactionContext)
 {
     _productID = productID;
     _productDataProxy = productDataProxy;
     _inventoryService = inventoryService;
     _orderService = orderService;
     _transactionContext = transactionContext;
 }
Exemplo n.º 22
0
 public DeleteProductCommand(long productID,
                             IProductDataProxy productDataProxy,
                             InventoryItemService inventoryService,
                             OrderService orderService,
                             ITransactionContext transactionContext)
 {
     _productID          = productID;
     _productDataProxy   = productDataProxy;
     _inventoryService   = inventoryService;
     _orderService       = orderService;
     _transactionContext = transactionContext;
 }
Exemplo n.º 23
0
        public void Product_and_inventory_item_should_be_created()
        {
            var product = CreateValidProduct();
            var productDataProxy = new ProductRepository();
            var inventoryDataProxy = new InventoryItemRepository();
            var inventoryService = new InventoryItemService(inventoryDataProxy);
            var command = new CreateProductCommand(product, productDataProxy, inventoryService, new TransactionContextStub());

            var newProduct = command.Execute().Value;

            productDataProxy.GetByID(newProduct.ID).ShouldNotBeNull();
            inventoryDataProxy.GetByProduct(newProduct.ID).ShouldNotBeNull();
        }
Exemplo n.º 24
0
        public void Product_and_inventory_item_should_be_created()
        {
            var product            = CreateValidProduct();
            var productDataProxy   = new ProductRepository();
            var inventoryDataProxy = new InventoryItemRepository();
            var inventoryService   = new InventoryItemService(inventoryDataProxy);
            var command            = new CreateProductCommand(product, productDataProxy, inventoryService, new TransactionContextStub());

            var newProduct = command.Execute().Value;

            productDataProxy.GetByID(newProduct.ID).ShouldNotBeNull();
            inventoryDataProxy.GetByProduct(newProduct.ID).ShouldNotBeNull();
        }
Exemplo n.º 25
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            var productsDataProxy  = new ProductRepository();
            var inventoryDataProxy = new InventoryItemRepository();

            _inventoryService  = new InventoryItemService(inventoryDataProxy);
            _orderItemsService = new OrderItemService(new OrderItemRepository(), productsDataProxy, _inventoryService, new DTCTransactionContext());
            _ordersService     = new OrderService(new OrderRepository(), _orderItemsService, new DTCTransactionContext());
            _customersService  = new CustomerService(new CustomerRepository(), _ordersService);
            _productsService   = new ProductService(productsDataProxy, _ordersService, _inventoryService, new DTCTransactionContext());
            _categoriesService = new CategoryService(new CategoryRepository(), _productsService);
            this.DataContext   = new MainWindowVM(_eventAggregator, _customersService, _productsService, _categoriesService, _ordersService, _inventoryService);
        }
Exemplo n.º 26
0
        public ActionResult Add(string name)
        {
            CorrolationIdHelper.SetCorrolationId(Guid.NewGuid());
            ServiceRequestWithData <ISingleSignOnToken, InventoryItemServiceCreateParameters> parameters = new ServiceRequestWithData <ISingleSignOnToken, InventoryItemServiceCreateParameters>
            {
                AuthenticationToken = GetAuthenticationToken(),
                Data = new InventoryItemServiceCreateParameters {
                    name = name
                }
            };

            InventoryItemService.Create(parameters);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 27
0
        public ActionResult CheckIn(Guid id)
        {
            CorrolationIdHelper.SetCorrolationId(Guid.NewGuid());
            ServiceRequestWithData <ISingleSignOnToken, InventoryItemServiceGetByRsnParameters> parameters = new ServiceRequestWithData <ISingleSignOnToken, InventoryItemServiceGetByRsnParameters>
            {
                AuthenticationToken = GetAuthenticationToken(),
                Data = new InventoryItemServiceGetByRsnParameters {
                    rsn = id
                }
            };

            ViewData.Model = InventoryItemService.GetByRsn(parameters).ResultData;
            return(View());
        }
Exemplo n.º 28
0
        public ActionResult Remove(Guid id, int number)
        {
            CorrolationIdHelper.SetCorrolationId(Guid.NewGuid());
            ServiceRequestWithData <ISingleSignOnToken, InventoryItemServiceRemoveParameters> parameters = new ServiceRequestWithData <ISingleSignOnToken, InventoryItemServiceRemoveParameters>
            {
                AuthenticationToken = GetAuthenticationToken(),
                Data = new InventoryItemServiceRemoveParameters {
                    rsn = id, count = number
                }
            };

            InventoryItemService.Remove(parameters);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 29
0
 void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     var productsDataProxy = new ProductRepository();
     var inventoryDataProxy = new InventoryItemRepository();
     var customerDataProxy = new CustomerRepository();
     var orderItemDataProxy = new OrderItemRepository();
     var orderRepository = new OrderRepository(customerDataProxy, orderItemDataProxy);
     _inventoryService = new InventoryItemService(inventoryDataProxy);
     _orderItemsService = new OrderItemService(orderItemDataProxy, productsDataProxy, inventoryDataProxy, new DTCTransactionContext());
     _ordersService = new OrderService(orderRepository, _orderItemsService, new DTCTransactionContext());
     _customersService = new CustomerService(customerDataProxy, _ordersService);
     _productsService = new ProductService(productsDataProxy, _ordersService, _inventoryService, new DTCTransactionContext());
     _categoriesService = new CategoryService(new CategoryRepository(), _productsService);
     this.DataContext = new MainWindowVM(_eventAggregator, _customersService, _productsService, _categoriesService, _ordersService, _inventoryService);
 }
Exemplo n.º 30
0
 private void Setup(EventAggregator eventAggregator, OrderService orderService, OrderItemService orderItemService, InventoryItemService inventoryService, MainWindowVM mainVM)
 {
     _orderService              = orderService;
     _orderItemService          = orderItemService;
     _inventoryService          = inventoryService;
     _mainVM                    = mainVM;
     _eventAggregator           = eventAggregator;
     _orderItems                = new ObservableCollection <OrderItemVM>();
     _saveOrderCommand          = new Command(async() => await SaveAsync());
     _addOrderItemCommand       = new Command(() => AddOrderItem(), () => CanAdd);
     _deleteSelectedItemCommand = new Command(async() => await DeleteSelectedItemAsync());
     _submitOrderCommand        = new Command(async() => await SubmitAsync());
     _shipOrderCommand          = new Command(async() => await ShipAsync());
     _refreshCommand            = new Command(async() => await LoadOrderItemsAsync());
 }
Exemplo n.º 31
0
 private void ConfigureEFUsage()
 {
     var productsDataProxy = new DAL.EF.ProductRepository();
     var inventoryDataProxy = new DAL.EF.InventoryItemRepository();
     var customerDataProxy = new DAL.EF.CustomerRepository();
     var orderItemDataProxy = new DAL.EF.OrderItemRepository();
     var orderRepository = new DAL.EF.OrderRepository();
     var categoriesDataProxy = new DAL.EF.CategoryRepository();
     _inventoryService = new InventoryItemService(inventoryDataProxy);
     _orderItemsService = new OrderItemService(orderItemDataProxy, productsDataProxy, inventoryDataProxy, new DTCTransactionContext());
     _ordersService = new OrderService(orderRepository, _orderItemsService, new DTCTransactionContext());
     _customersService = new CustomerService(customerDataProxy, _ordersService);
     _productsService = new ProductService(productsDataProxy, orderRepository, _inventoryService, new DTCTransactionContext());
     _categoriesService = new CategoryService(categoriesDataProxy, productsDataProxy);
     this.DataContext = new MainWindowVM(_eventAggregator, _customersService, _productsService, _categoriesService, _ordersService, _inventoryService);
 }
Exemplo n.º 32
0
        private void ConfigureEFUsage()
        {
            var productsDataProxy   = new DAL.EF.ProductRepository();
            var inventoryDataProxy  = new DAL.EF.InventoryItemRepository();
            var customerDataProxy   = new DAL.EF.CustomerRepository();
            var orderItemDataProxy  = new DAL.EF.OrderItemRepository();
            var orderRepository     = new DAL.EF.OrderRepository();
            var categoriesDataProxy = new DAL.EF.CategoryRepository();

            _inventoryService  = new InventoryItemService(inventoryDataProxy);
            _orderItemsService = new OrderItemService(orderItemDataProxy, productsDataProxy, inventoryDataProxy, new DTCTransactionContext());
            _ordersService     = new OrderService(orderRepository, _orderItemsService, new DTCTransactionContext());
            _customersService  = new CustomerService(customerDataProxy, _ordersService);
            _productsService   = new ProductService(productsDataProxy, orderRepository, _inventoryService, new DTCTransactionContext());
            _categoriesService = new CategoryService(categoriesDataProxy, productsDataProxy);
            this.DataContext   = new MainWindowVM(_eventAggregator, _customersService, _productsService, _categoriesService, _ordersService, _inventoryService);
        }
Exemplo n.º 33
0
        private async Task ImportInventory(List <CSVDataSummary> eslst)
        {
            var itmlst = from i in eslst
                         group i by i.ItemNumber.ToUpper()
                         into g
                         select new { ItemNumber = g.Key, g.FirstOrDefault().ItemDescription, g.FirstOrDefault().TariffCode };

            using (var ctx = new InventoryItemService()
            {
                StartTracking = true
            })
            {
                foreach (var item in itmlst)
                {
                    var i =
                        await ctx.GetInventoryItemByKey(item.ItemNumber, null, true).ConfigureAwait(false);


                    if (i == null)
                    {
                        i = new InventoryItem(true)
                        {
                            Description   = item.ItemDescription,
                            ItemNumber    = item.ItemNumber,
                            TrackingState = TrackingState.Added
                        };
                        if (!string.IsNullOrEmpty(item.TariffCode))
                        {
                            i.TariffCode = item.TariffCode;
                        }
                        await ctx.CreateInventoryItem(i).ConfigureAwait(false);
                    }
                    else
                    {
                        i.StartTracking();
                        i.Description = item.ItemDescription;
                        if (!string.IsNullOrEmpty(item.TariffCode))
                        {
                            i.TariffCode = item.TariffCode;
                        }
                        await ctx.UpdateInventoryItem(i).ConfigureAwait(false);
                    }
                }
            }
        }
Exemplo n.º 34
0
 public MainWindowVM(EventAggregator eventAggregator,
                     CustomerService customerService,
                     ProductService productService,
                     CategoryService categoryService,
                     OrderService orderService,
                     InventoryItemService inventoryService)
 {
     _customersVM = new CustomersVM(customerService);
     _customersVM.LoadCustomersCommand.Execute(null);
     _productsVM = new ProductsVM(productService, this);
     _productsVM.LoadProductsCommand.Execute(null);
     _categoriesVM = new CategoriesVM(categoryService);
     _categoriesVM.LoadCategoriesCommand.Execute(null);
     _ordersVM = new OrdersVM(orderService, this, eventAggregator);
     _ordersVM.LoadOrdersCommand.Execute(null);
     _inventoryItemsVM = new InventoryItemsVM(inventoryService, this);
     _inventoryItemsVM.LoadInventoryCommand.Execute(null);
 }
        public static async Task AssignTariffToItms(IList list, TariffCode tariffCode)
        {
            if (tariffCode == null)
            {
                throw new ApplicationException("Please Select TariffCode then Continue");
            }
            using (var ctx = new InventoryItemService())
            {
                foreach (VirtualListItem <InventoryQS.Business.Entities.InventoryItemsEx> item in list)
                {
                    InventoryItem itm = await ctx.GetInventoryItemByKey(item.Data.ItemNumber);

                    item.Data.TariffCode = tariffCode.TariffCodeName;
                    itm.TariffCode       = tariffCode.TariffCodeName;
                    await ctx.UpdateInventoryItem(itm).ConfigureAwait(false);
                }
            }
        }
Exemplo n.º 36
0
 public MainWindowVM(EventAggregator eventAggregator,
                     CustomerService customerService,
                     ProductService productService,
                     CategoryService categoryService,
                     OrderService orderService,
                     InventoryItemService inventoryService)
 {
     _customersVM = new CustomersVM(customerService);
     _customersVM.LoadCustomersCommand.Execute(null);
     _productsVM = new ProductsVM(productService, this);
     _productsVM.LoadProductsCommand.Execute(null);
     _categoriesVM = new CategoriesVM(categoryService);
     _categoriesVM.LoadCategoriesCommand.Execute(null);
     _ordersVM = new OrdersVM(orderService, this, eventAggregator);
     _ordersVM.LoadOrdersCommand.Execute(null);
     _inventoryItemsVM = new InventoryItemsVM(inventoryService, this);
     _inventoryItemsVM.LoadInventoryCommand.Execute(null);
 }
        public async Task AssignTariffToItms(IEnumerable <string> lst, string tariffCode)
        {
            if (tariffCode == null)
            {
                throw new ApplicationException("Please Select TariffCode then Continue");
            }

            using (var ctx = new InventoryItemService())
            {
                foreach (string item in lst)
                {
                    var itm = await ctx.GetInventoryItemByKey(item).ConfigureAwait(false);

                    itm.TariffCode = tariffCode;
                    await ctx.UpdateInventoryItem(itm).ConfigureAwait(false);
                }
            }
        }
Exemplo n.º 38
0
 public CustomerOrderWindow(OrderVM currentOrder,
                            OrderService orderService,
                            CustomerService customerService,
                            OrderItemService orderItemService,
                            InventoryItemService inventoryService,
                            MainWindowVM mainVM,
                            EventAggregator eventAggregator)
     : this()
 {
     var order = new Order()
     {
         ID = currentOrder.ID,
         CustomerID = currentOrder.CustomerID,
         OrderDate = currentOrder.OrderDate,
     };
     var vm = new CustomerOrderVM(eventAggregator, order, orderService, orderItemService, inventoryService, mainVM);
     vm.RefreshCommand.Execute(null);
     DataContext = vm;
 }
Exemplo n.º 39
0
 private ICommand<Product> CreateCommand(Product product)
 {
     var productDataProxy = new ProductRepository();
     var inventoryDataProxy = new InventoryItemRepository();
     var inventoryService = new InventoryItemService(inventoryDataProxy);
     return new CreateProductCommand(product, productDataProxy, inventoryService, new TransactionContextStub());
 }