コード例 #1
0
        /// <summary>
        /// Get All Inventory Items in the database
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult Get()
        {
            InventoryItemService InventoryItemService = CreateInventoryItemService();
            var inventoryItems = InventoryItemService.GetInventoryItem();

            return(Ok(inventoryItems));
        }
コード例 #2
0
        private InventoryItemService CreateInventoryItemService()
        {
            var userId       = Guid.Parse(User.Identity.GetUserId());
            var stateService = new InventoryItemService(userId);

            return(stateService);
        }
コード例 #3
0
ファイル: InventoryItemsVM.cs プロジェクト: peasy/Samples
 public InventoryItemsVM(InventoryItemService inventoryService, MainWindowVM mainVM)
 {
     _inventoryService = inventoryService;
     _mainVM = mainVM;
     _saveInventoryItemsCommand = new Command(async () => await SaveInventoryItemsAsync());
     _loadInventoryItemsCommand = new Command(async () => await LoadInventoryItemsAsync());
 }
コード例 #4
0
 public OrderItemVM(OrderItemService service, InventoryItemService inventoryService, MainWindowVM mainVM)
     : base(service)
 {
     _mainVM           = mainVM;
     _shipCommand      = new Command(async() => await ShipAsync());
     _inventoryService = inventoryService;
 }
コード例 #5
0
        public InventoryItemController(SCMSContext _context)
        {
            var optionBuilder = new DbContextOptions <SCMSContext>();

            _inventoryItemRepository = new InventoryItemRepository(_context);
            _inventoryItemService    = new InventoryItemService(_inventoryItemRepository);
        }
コード例 #6
0
 public CreateProductCommand(Product product, IProductDataProxy productDataProxy, InventoryItemService inventoryService, ITransactionContext transactionContext)
 {
     CurrentProduct      = product;
     _productDataProxy   = productDataProxy;
     _inventoryService   = inventoryService;
     _transactionContext = transactionContext;
 }
コード例 #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));
     }
 }
コード例 #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;
 }
コード例 #9
0
 public ShipOrderItemCommand(long orderItemID, IOrderItemDataProxy orderItemDataProxy, InventoryItemService inventoryService, ITransactionContext transactionContext)
 {
     _orderItemID        = orderItemID;
     _orderItemDataProxy = orderItemDataProxy;
     _inventoryService   = inventoryService;
     _transactionContext = transactionContext;
 }
コード例 #10
0
 public InventoryItemsVM(InventoryItemService inventoryService, MainWindowVM mainVM)
 {
     _inventoryService          = inventoryService;
     _mainVM                    = mainVM;
     _saveInventoryItemsCommand = new Command(async() => await SaveInventoryItemsAsync());
     _loadInventoryItemsCommand = new Command(async() => await LoadInventoryItemsAsync());
 }
コード例 #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);
        }
コード例 #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);
                    }
                }
            }
        }
コード例 #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()));
        }
コード例 #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;
 }
コード例 #15
0
 public async Task SaveInventoryItem(InventoryItem i)
 {
     if (i == null)
     {
         return;
     }
     using (var ctx = new InventoryItemService())
     {
         await ctx.UpdateInventoryItem(i).ConfigureAwait(false);
     }
 }
コード例 #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;
 }
コード例 #17
0
ファイル: OrderUtilities.cs プロジェクト: Salle79/Accelerator
 public OrderUtilities(
     CartAccessor cartAccessor,
     VariantService variantService,
     InventoryItemService inventoryItemService,
     IStockStatusCalculator stockStatusCalculator)
 {
     _stockStatusCalculator = stockStatusCalculator;
     _inventoryItemService  = inventoryItemService;
     _cartAccessor          = cartAccessor;
     _variantService        = variantService;
 }
コード例 #18
0
        /// <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());
        }
コード例 #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;
        }
コード例 #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());
        }
コード例 #21
0
 public DeleteProductCommand(long productID, 
                             IProductDataProxy productDataProxy, 
                             InventoryItemService inventoryService, 
                             OrderService orderService,
                             ITransactionContext transactionContext)
 {
     _productID = productID;
     _productDataProxy = productDataProxy;
     _inventoryService = inventoryService;
     _orderService = orderService;
     _transactionContext = transactionContext;
 }
コード例 #22
0
 public DeleteProductCommand(long productID,
                             IProductDataProxy productDataProxy,
                             InventoryItemService inventoryService,
                             OrderService orderService,
                             ITransactionContext transactionContext)
 {
     _productID          = productID;
     _productDataProxy   = productDataProxy;
     _inventoryService   = inventoryService;
     _orderService       = orderService;
     _transactionContext = transactionContext;
 }
コード例 #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();
        }
コード例 #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();
        }
コード例 #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);
        }
コード例 #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"));
        }
コード例 #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());
        }
コード例 #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"));
        }
コード例 #29
0
ファイル: MainWindow.xaml.cs プロジェクト: ndphuong/Peasy.NET
 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);
 }
コード例 #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());
 }
コード例 #31
0
ファイル: MainWindow.xaml.cs プロジェクト: njmube/Samples
 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);
 }
コード例 #32
0
ファイル: MainWindow.xaml.cs プロジェクト: Degot/Samples
        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);
        }
コード例 #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);
                    }
                }
            }
        }
コード例 #34
0
ファイル: MainWindowVM.cs プロジェクト: johnsonch/Peasy.NET
 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);
 }
コード例 #35
0
        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);
                }
            }
        }
コード例 #36
0
ファイル: MainWindowVM.cs プロジェクト: Degot/Samples
 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);
 }
コード例 #37
0
        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);
                }
            }
        }
コード例 #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;
 }
コード例 #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());
 }