public CreatePaymentViewModel(RepositoryViewModel repositoryViewModel)
        {
            _repositoryViewModel = repositoryViewModel;
            CreateCommand        = new InlineCommand(o => OnCreate((Window)o));
            CancelCommand        = new InlineCommand(o => OnCancel((Window)o));

            Wallet = _repositoryViewModel.Wallets.FirstOrDefault();
            Date   = DateTime.Today;
            Amount = 0;
        }
Пример #2
0
        public CurrentBookViewModel(BookService bookService, RepositoryViewModel repository)
        {
            _bookService      = bookService;
            Repository        = repository;
            CreateBookCommand = new InlineCommand(OnCreateBook);
            OpenBookCommand   = new InlineCommand(OnOpenBook);

            CreateWalletCommand = new InlineCommand(o => {
                var window = new CreateWalletWindow();
                window.Show();
            });

            CreatePaymentCommand = new InlineCommand(o => {
                var window = new CreatePaymentWindow();
                window.Show();
            });
        }
 public CreateWalletViewModel(RepositoryViewModel repositoryViewModel)
 {
     _repositoryViewModel = repositoryViewModel;
     CreateCommand        = new InlineCommand(o => OnCreate((Window)o));
     CancelCommand        = new InlineCommand(o => OnCancel((Window)o));
 }