public CategoriesViewmodel(MainViewmodel mainViewmodel) : base(RepositoryResolver.GetRepository <ICategoryRepository>()) { _mainViewmodel = mainViewmodel; _mainCategoriesRepository = RepositoryResolver.GetRepository <IMainCategoryRepository>(); LoadMainCategories(); _searchTerm = string.Empty; MaintainMainCategoriesCommand = new RelayCommand(async(obj) => await MaintainMainCategoriesAsync(), CanMaintainMainCategories); }
public RelationsViewmodel(MainViewmodel mainViewmodel, IDialogCoordinator instance) : base(RepositoryResolver.GetRepository <IRelationRepository>()) { dialogCoordinator = instance; _mainViewmodel = mainViewmodel; _categoryRepository = RepositoryResolver.GetRepository <ICategoryRepository>(); _transactionRepository = RepositoryResolver.GetRepository <ITransactionRepository>(); AddCategoryToRelationCommand = new RelayCommand(AddCategoryToRelation, CanAddCategoryToRelation); LoadCategories(); }
public StatisticsViewmodel(MainViewmodel mainViewmodel, IStatisticsView statisticsView) { _mainViewmodel = mainViewmodel; this._statisticsView = statisticsView; CurrentExecutingTasks = new ObservableCollection <TaskExecutorWrapper>(); _repository = RepositoryResolver.GetRepository <ICategoriesStatisticsRepository>(); FromDate = DateTime.Now.AddMonths(-1); ToDate = DateTime.Now; RemoveActionIfFaultedCommand = new RelayCommand(RemoveActionIfFaulted); RefreshCommand = new RelayCommand(Refresh); Refresh(null); EditTransactionCommand = new RelayCommand(async(obj) => await EditTransactionAsync((Transaction)obj)); }
public TransActionsViewmodel(MainViewmodel mainViewmodel) : base(RepositoryResolver.GetRepository <ITransactionRepository>()) { _mainViewmodel = mainViewmodel; _relationRepository = RepositoryResolver.GetRepository <IRelationRepository>(); _categoryRepository = RepositoryResolver.GetRepository <ICategoryRepository>(); FromDate = DateTime.Now.AddMonths(-1); ToDate = DateTime.Now; LoadRelations(); LoadCategories(); AddCategoryToTransactionCommand = new RelayCommand(AddCategoryToTransaction, CanAddCategoryToTransaction); ImportCommand = new RelayCommand(async(obj) => await ImportTransactionsAsync()); }
public EditTransactionWizardViewmodel(Transaction transaction, IView view, MainViewmodel mainViewmodel) { this.transaction = transaction; EditingItem = App.Mapper.Map <Transaction>(transaction); AnnulerenCommand = new RelayCommand((object obj) => { view.Close(); }); SaveCommand = new RelayCommand(SaveTransaction); DeleteCommand = new RelayCommand(DeleteTransaction); EditTransactionNotifier = new NotifyTaskCompletion <Transaction>(Task.FromResult <Transaction>(null)); _view = view; Result = false; FilterCategories = mainViewmodel.TransactionsViewmodel.FilterCategories; Categories = mainViewmodel.TransactionsViewmodel.Categories; Relations = mainViewmodel.TransactionsViewmodel.Relations; LinkWrappers = mainViewmodel.TransactionsViewmodel.CreateWrappers(EditingItem); mainViewmodel.TransactionsViewmodel.InitializeLinkWrapperIfNonExists(LinkWrappers); }
public MainCategoryViewmodel(MainViewmodel mainViewmodel, CategoriesViewmodel categoryViewmodel) : base(RepositoryResolver.GetRepository <IMainCategoryRepository>()) { _mainViewmodel = mainViewmodel; _categoryViewmodel = categoryViewmodel; }