Exemple #1
0
        public InventoryModule(IRegionManager regionManager, ICacheService cacheService, IUserService userService, IInventoryService inventoryService,
                               WarehouseInventoryView resourceInventoryView, WarehouseInventoryViewModel resourceInventoryViewModel, ILogService logService)
            : base(regionManager, AppScreens.InventoryView)
        {
            _regionManager               = regionManager;
            _cacheService                = cacheService;
            _userService                 = userService;
            _inventoryService            = inventoryService;
            _warehouseInventoryView      = resourceInventoryView;
            _warehouseInventoryViewModel = resourceInventoryViewModel;
            _logService = logService;

            AddDashboardCommand <EntityCollectionViewModelBase <WarehouseTypeViewModel, WarehouseType> >(Resources.WarehouseType.ToPlural(), Resources.Inventory, 46);
            AddDashboardCommand <EntityCollectionViewModelBase <WarehouseViewModel, Warehouse> >(Resources.Warehouse.ToPlural(), Resources.Inventory, 46);
            AddDashboardCommand <EntityCollectionViewModelBase <TransactionTypeViewModel, InventoryTransactionType> >(Resources.TransactionType.ToPlural(), Resources.Inventory, 46);
            AddDashboardCommand <EntityCollectionViewModelBase <TransactionDocumentTypeViewModel, InventoryTransactionDocumentType> >(Resources.DocumentType.ToPlural(), Resources.Inventory, 46);
            AddDashboardCommand <TransactionDocumentListViewModel>(Resources.Transaction.ToPlural(), Resources.Inventory, 46);
            AddDashboardCommand <EntityCollectionViewModelBase <InventoryItemViewModel, InventoryItem> >(Resources.InventoryItems, Resources.Inventory, 46);
            AddDashboardCommand <RecipeListViewModel>(Resources.Recipes, Resources.Inventory, 46);
            AddDashboardCommand <PeriodicConsumptionListViewModel>(Resources.EndOfDayRecords, Resources.Inventory, 47);

            SetNavigationCommand(Resources.Warehouses, Resources.Common, "Images/Warehouses.png", 40);

            EventServiceFactory.EventService.GetEvent <GenericEvent <Entity> >().Subscribe(OnResourceEvent);
            EventServiceFactory.EventService.GetEvent <GenericEvent <Warehouse> >().Subscribe(OnWarehouseEvent);

            PermissionRegistry.RegisterPermission(PermissionNames.OpenInventory, PermissionCategories.Navigation, string.Format(Resources.CanNavigate_f, Resources.Inventory));
        }
Exemple #2
0
 public WarehouseButton(Warehouse model, WarehouseInventoryViewModel baseViewModel)
 {
     _baseViewModel = baseViewModel;
     Model          = model;
 }
 public WarehouseInventoryView(WarehouseInventoryViewModel viewModel)
 {
     DataContext = viewModel;
     InitializeComponent();
 }