Beispiel #1
0
 public EditUserViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator)
     : base(dbConversation, eventAggregator)
 {
     dbConversation.UsingTransaction(() =>
                                     AllUserRoles = dbConversation.Query(new AllUserRolesQuery()).ToList());
     CommitCommand = new DelegateCommand(OnCommit);
 }
Beispiel #2
0
 public RecipeExecutor(IDbConversation dbConversation, IRecipeFinder recipeFinder, IStockFinder stockFinder, IStockBooker stockBooker)
 {
     _dbConversation = dbConversation;
     _recipeFinder = recipeFinder;
     _stockFinder = stockFinder;
     _stockBooker = stockBooker;
 }
Beispiel #3
0
        public AllStocksViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator)
            : base(dbConversation, eventAggregator)
        {
            base.DisplayName = Strings.ViewModel_AllStocksViewModel_DisplayName;

            CreateAllStocks();
            _stockInsertedToken = EventAggregator.GetEvent<StockChangedEvent>().Subscribe(OnStockChanged);
        }
 public EditUnitTypeViewModel(IDbConversation dbConversation, IRegionManager regionManager, IEventAggregator eventAggregator)
 {
     _dbConversation = dbConversation;
     _regionManager = regionManager;
     _eventAggregator = eventAggregator;
     SaveCommand = new DelegateCommand(OnSave, CanSave);
     CancelCommand = new DelegateCommand(OnCancel);
 }
        public AllProductionItemsViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator) 
            : base(dbConversation, eventAggregator)
        {
            base.DisplayName = Strings.ViewModel_AllProductionItemsViewModel_DisplayName;

            CreateAllProductionItems();
            _productionItemInsertedToken = EventAggregator.GetEvent<ProductionItemChangedEvent>().Subscribe(OnProductionItemChanged);
        }
        public AllPurchaseFamiliesViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator)
            : base(dbConversation, eventAggregator)
        {
            base.DisplayName = Strings.ViewModel_AllPurchaseFamiliesViewModel_DisplayName;

            CreateAllPurchaseFamilies();
            _purchaseFamilyInsertedToken = EventAggregator.GetEvent<PurchaseFamilyChangedEvent>().Subscribe(OnPurchaseFamilyChanged);
        }
 public StockItemBookingViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator, IStockBooker stockBooker)
     : base(dbConversation, eventAggregator)
 {
     _stockBooker = stockBooker;
     _moveBookStockItems = new MoveBookStockItems(dbConversation);
     PreloadLists();
     base.DisplayName = Strings.ViewModel_StockItemBookinViewModel_Title;
 }
Beispiel #8
0
        public LoginViewModel(IDbConversation dbConversation)
        {
            _dbConversation    = dbConversation;
            _passwordgenerator = new PasswordGenerator();

            LoginCommand  = new DelegateCommand(DoLogin, CanLogin);
            CancelCommand = new DelegateCommand(DoCancel);
        }
 public EditUnitTypeViewModel(IDbConversation dbConversation, IRegionManager regionManager, IEventAggregator eventAggregator)
 {
     _dbConversation  = dbConversation;
     _regionManager   = regionManager;
     _eventAggregator = eventAggregator;
     SaveCommand      = new DelegateCommand(OnSave, CanSave);
     CancelCommand    = new DelegateCommand(OnCancel);
 }
        public AllUnitTypesViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator)
            : base(dbConversation, eventAggregator)
        {
            base.DisplayName = Strings.ViewModel_AllUnitTypesViewModel_DisplayName;

            CreateAllUnitTypes();
            _unitTypeInsertedToken = EventAggregator.GetEvent<UnitTypeChangededEvent>().Subscribe(OnUnitTypeChanged);
        }
Beispiel #11
0
        static public EditUserViewModel CreateViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator)
        {
            var viewModel = new EditUserViewModel();

            viewModel.Element     = new UserModel();
            viewModel.DisplayName = "Add new user...";
            dbConversation.UsingTransaction(() =>
                                            viewModel.AllUserRoles = dbConversation.Query(new AllUserRolesQuery()).ToList());
            return(viewModel);
        }
Beispiel #12
0
        public UnitTypesViewModel(IDbConversation dbConversation, IRegionManager regionManager)
        {
            _dbConversation = dbConversation;
            _regionManager  = regionManager;

            NewUnitTypeCommand  = new DelegateCommand(OnNewUnitType);
            EditUnitTypeCommand = new DelegateCommand(OnEditUnitType, CanEditUnitType);
            DelUnitTypeCommand  = new DelegateCommand(OnDelUnitType, CanDelUnitType);

            CreateDatasets();
        }
Beispiel #13
0
        public UnitTypesViewModel(IDbConversation dbConversation, IRegionManager regionManager)
        {
            _dbConversation = dbConversation;
            _regionManager = regionManager;

            NewUnitTypeCommand = new DelegateCommand(OnNewUnitType);
            EditUnitTypeCommand = new DelegateCommand(OnEditUnitType, CanEditUnitType);
            DelUnitTypeCommand = new DelegateCommand(OnDelUnitType, CanDelUnitType);

            CreateDatasets();
        }
Beispiel #14
0
        static public EditUserViewModel CreateViewModel(int userId, IDbConversation dbConversation, IEventAggregator eventAggregator)
        {
            var viewModel = new EditUserViewModel();

            dbConversation.UsingTransaction(() =>
            {
                viewModel.Element      = new UserModel(dbConversation.GetById <User>(userId));
                viewModel.AllUserRoles = dbConversation.Query(new AllUserRolesQuery()).ToList();
            });
            viewModel.DisplayName = "Edit user...";
            return(viewModel);
        }
Beispiel #15
0
        public UserRolesViewModel(IDbConversation dbConversation, IRegionManager regionManager, IEventAggregator eventAggregator)
        {
            _dbConversation  = dbConversation;
            _regionManager   = regionManager;
            _eventAggregator = eventAggregator;

            CreateDatasets();

            AddNewUserRoleCommand            = new DelegateCommand(AddNewUserRole);
            EditUserRoleCommand              = new DelegateCommand(EditUserRole, CanEditUserRole);
            RemoveUserRoleCommand            = new DelegateCommand(RemoveUserRole, CanRemoveUserRole);
            SelectedItems                    = new ObservableCollection <UserRoleViewModel>();
            SelectedItems.CollectionChanged += (sender, args) =>
            {
                ((DelegateCommand)EditUserRoleCommand).RaiseCanExecuteChanged();
                ((DelegateCommand)RemoveUserRoleCommand).RaiseCanExecuteChanged();
            };

            _eventAggregator.GetEvent <UserRoleAddedEvent>().Subscribe(OnUserRoleAdded);
            _eventAggregator.GetEvent <UserRoleChangedEvent>().Subscribe(OnUserRoleChanged);
            _eventAggregator.GetEvent <UserRoleRemovedEvent>().Subscribe(OnUserRoleRemoved);
        }
Beispiel #16
0
        public UserRolesViewModel(IDbConversation dbConversation, IRegionManager regionManager, IEventAggregator eventAggregator)
        {
            _dbConversation = dbConversation;
            _regionManager = regionManager;
            _eventAggregator = eventAggregator;

            CreateDatasets();

            AddNewUserRoleCommand = new DelegateCommand(AddNewUserRole);
            EditUserRoleCommand = new DelegateCommand(EditUserRole, CanEditUserRole);
            RemoveUserRoleCommand = new DelegateCommand(RemoveUserRole, CanRemoveUserRole);
            SelectedItems = new ObservableCollection<UserRoleViewModel>();
            SelectedItems.CollectionChanged += (sender, args) =>
                {
                    ((DelegateCommand) EditUserRoleCommand).RaiseCanExecuteChanged();
                    ((DelegateCommand) RemoveUserRoleCommand).RaiseCanExecuteChanged();
                };

            _eventAggregator.GetEvent<UserRoleAddedEvent>().Subscribe(OnUserRoleAdded);
            _eventAggregator.GetEvent<UserRoleChangedEvent>().Subscribe(OnUserRoleChanged);
            _eventAggregator.GetEvent<UserRoleRemovedEvent>().Subscribe(OnUserRoleRemoved);
        }
Beispiel #17
0
 public RecipeFinder(IDbConversation dbConversation)
 {
     _dbConversation = dbConversation;
 }
Beispiel #18
0
        public PurchaseFamiliesViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
        public ProductionItemsViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
Beispiel #20
0
        public RecipesViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
Beispiel #21
0
 public StockFinder(IDbConversation dbConversation)
 {
     _dbConversation = dbConversation;
 }
Beispiel #22
0
 protected ResponsibleWorkspaceViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator) : base(dbConversation, eventAggregator)
 {
 }
Beispiel #23
0
 protected EditItemViewModel()
 {
     DbConversation  = IoC.Get <IDbConversation>();
     EventAggregator = IoC.Get <IEventAggregator>();
 }
 public SimpleWorkspaceViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator)
     : base(dbConversation, eventAggregator)
 {
 }
        public PurchaseItemsViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
Beispiel #26
0
        public UserRolesViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
 public MoveRemovalStockItems(IDbConversation dbConversation) 
     : base(dbConversation)
 {
 }
Beispiel #28
0
 public MoveBookStockItems(IDbConversation dbConversation)
     : base(dbConversation)
 {
 }
Beispiel #29
0
        public CurrenciesViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
 protected EditStockMovements(IDbConversation dbConversation)
 {
     _dbConversation = dbConversation;
 }
Beispiel #31
0
 protected WorkspaceViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator)
 {
     EventAggregator = eventAggregator;
     DbConversation = dbConversation;
 }
Beispiel #32
0
        public UserRolesViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
        public ProductionItemsViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
Beispiel #34
0
 public EditUserRoleViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator)
     : base(dbConversation, eventAggregator)
 {
     CommitCommand = new DelegateCommand(OnCommit);
 }
Beispiel #35
0
        public TokensViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
Beispiel #36
0
        public CurrenciesViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
Beispiel #37
0
        public TokensViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
 public NumberedWorkspaceViewModel(int number, IDbConversation dbConversation, IEventAggregator eventAggregator)
     : base(dbConversation, eventAggregator)
 {
     ContainedObject = number;
 }
Beispiel #39
0
        public RecipesViewModel(IDbConversation dbConversation)
        {
            _dbConversation = dbConversation;

            CreateDatasets();
        }
Beispiel #40
0
 protected SelectionListViewModel(string caption)
 {
     DbConversation  = IoC.Get <IDbConversation>();
     EventAggregator = IoC.Get <IEventAggregator>();
     DisplayName     = caption;
 }