public EditUserViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator) : base(dbConversation, eventAggregator) { dbConversation.UsingTransaction(() => AllUserRoles = dbConversation.Query(new AllUserRolesQuery()).ToList()); CommitCommand = new DelegateCommand(OnCommit); }
public RecipeExecutor(IDbConversation dbConversation, IRecipeFinder recipeFinder, IStockFinder stockFinder, IStockBooker stockBooker) { _dbConversation = dbConversation; _recipeFinder = recipeFinder; _stockFinder = stockFinder; _stockBooker = stockBooker; }
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; }
public LoginViewModel(IDbConversation dbConversation) { _dbConversation = dbConversation; _passwordgenerator = new PasswordGenerator(); LoginCommand = new DelegateCommand(DoLogin, CanLogin); CancelCommand = new DelegateCommand(DoCancel); }
public AllUnitTypesViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator) : base(dbConversation, eventAggregator) { base.DisplayName = Strings.ViewModel_AllUnitTypesViewModel_DisplayName; CreateAllUnitTypes(); _unitTypeInsertedToken = EventAggregator.GetEvent<UnitTypeChangededEvent>().Subscribe(OnUnitTypeChanged); }
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); }
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(); }
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); }
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); }
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); }
public RecipeFinder(IDbConversation dbConversation) { _dbConversation = dbConversation; }
public PurchaseFamiliesViewModel(IDbConversation dbConversation) { _dbConversation = dbConversation; CreateDatasets(); }
public ProductionItemsViewModel(IDbConversation dbConversation) { _dbConversation = dbConversation; CreateDatasets(); }
public RecipesViewModel(IDbConversation dbConversation) { _dbConversation = dbConversation; CreateDatasets(); }
public StockFinder(IDbConversation dbConversation) { _dbConversation = dbConversation; }
protected ResponsibleWorkspaceViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator) : base(dbConversation, eventAggregator) { }
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(); }
public UserRolesViewModel(IDbConversation dbConversation) { _dbConversation = dbConversation; CreateDatasets(); }
public MoveRemovalStockItems(IDbConversation dbConversation) : base(dbConversation) { }
public MoveBookStockItems(IDbConversation dbConversation) : base(dbConversation) { }
public CurrenciesViewModel(IDbConversation dbConversation) { _dbConversation = dbConversation; CreateDatasets(); }
protected EditStockMovements(IDbConversation dbConversation) { _dbConversation = dbConversation; }
protected WorkspaceViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator) { EventAggregator = eventAggregator; DbConversation = dbConversation; }
public EditUserRoleViewModel(IDbConversation dbConversation, IEventAggregator eventAggregator) : base(dbConversation, eventAggregator) { CommitCommand = new DelegateCommand(OnCommit); }
public TokensViewModel(IDbConversation dbConversation) { _dbConversation = dbConversation; CreateDatasets(); }
public NumberedWorkspaceViewModel(int number, IDbConversation dbConversation, IEventAggregator eventAggregator) : base(dbConversation, eventAggregator) { ContainedObject = number; }
protected SelectionListViewModel(string caption) { DbConversation = IoC.Get <IDbConversation>(); EventAggregator = IoC.Get <IEventAggregator>(); DisplayName = caption; }