Ejemplo n.º 1
0
        public AccountTreeViewModel(
            ILoggerFactory loggerFactory,
            IAccountService accountService,
            IAccountRelationshipService accountRelationshipService,
            ITransactionService transactionService,
            ITransactionRelationshipService transactionRelationshipService,
            IAccountTreeItemViewModelFactory accountTreeItemViewModelFactory,
            IAccountCreateViewService accountCreateViewService,
            IAccountEditViewService accountEditViewService,
            IAccountTransactionsEditViewService accountTransactionsEditViewService,
            INoPendingCreditCardTransactionsViewService noPendingCreditCardTrasnactionsViewService,
            ITransactionBatchCreateConfirmViewService transactionBatchCreateConfirmViewService)
        {
            m_logger                                     = loggerFactory.CreateLogger <AccountTreeViewModel>();
            m_accountService                             = accountService;
            m_accountRelationshipService                 = accountRelationshipService;
            m_transactionService                         = transactionService;
            m_transactionRelationshipService             = transactionRelationshipService;
            m_accountTreeItemViewModelFactory            = accountTreeItemViewModelFactory;
            m_accountCreateViewService                   = accountCreateViewService;
            m_accountEditViewService                     = accountEditViewService;
            m_accountTransactionsEditViewService         = accountTransactionsEditViewService;
            m_noPendingCreditCardTrasnactionsViewService = noPendingCreditCardTrasnactionsViewService;
            m_transactionBatchCreateConfirmViewService   = transactionBatchCreateConfirmViewService;

            m_showAssets      = true;
            m_showLiabilities = true;
            m_showIncome      = false;
            m_showExpenses    = false;
            m_showCapital     = false;

            PopulateAccountTreeItems();
        }
Ejemplo n.º 2
0
 public AccountTreeViewModelFactory(
     ILoggerFactory loggerFactory,
     IAccountService accountService,
     IAccountRelationshipService accountRelationshipService,
     ITransactionService transactionService,
     ITransactionRelationshipService transactionRelationshipService,
     IAccountTreeItemViewModelFactory accountTreeItemViewModelFactory,
     IAccountCreateViewService accountCreateViewService,
     IAccountEditViewService accountEditViewService,
     IAccountTransactionsEditViewService accountTransactionsEditViewService,
     INoPendingCreditCardTransactionsViewService noPendingCreditCardTrasnactionsViewService,
     ITransactionBatchCreateConfirmViewService transactionBatchCreateConfirmViewService)
 {
     m_loggerFactory                              = loggerFactory;
     m_accountService                             = accountService;
     m_accountRelationshipService                 = accountRelationshipService;
     m_transactionService                         = transactionService;
     m_transactionRelationshipService             = transactionRelationshipService;
     m_accountTreeItemViewModelFactory            = accountTreeItemViewModelFactory;
     m_accountCreateViewService                   = accountCreateViewService;
     m_accountEditViewService                     = accountEditViewService;
     m_accountTransactionsEditViewService         = accountTransactionsEditViewService;
     m_noPendingCreditCardTrasnactionsViewService = noPendingCreditCardTrasnactionsViewService;
     m_transactionBatchCreateConfirmViewService   = transactionBatchCreateConfirmViewService;
 }
Ejemplo n.º 3
0
 public AccountRelationshipDetailsViewModelFactory(
     ILoggerFactory loggerFactory,
     IAccountService accountService,
     IAccountRelationshipService accountRelationshipService)
 {
     m_loggerFactory              = loggerFactory;
     m_accountService             = accountService;
     m_accountRelationshipService = accountRelationshipService;
 }
Ejemplo n.º 4
0
 public IncomeExpenseService(
     ILoggerFactory loggerFactory,
     IAccountRelationshipService accountRelationshipService,
     IAccountService accountService,
     ICurrencyService currencyService,
     ITransactionService transactionService)
 {
     m_logger             = loggerFactory.CreateLogger <IncomeExpenseService>();
     m_accountService     = accountService;
     m_currencyService    = currencyService;
     m_transactionService = transactionService;
 }
Ejemplo n.º 5
0
        public AccountRelationshipCreateViewModel(
            ILoggerFactory loggerFactory,
            IAccountService accountService,
            IAccountRelationshipService accountRelationshipService,
            AccountRelationship hint) : base(accountService, accountRelationshipService, 0)
        {
            m_logger = loggerFactory.CreateLogger <AccountRelationshipCreateViewModel>();

            SourceAccount      = Accounts.Single(a => a.AccountId == hint.SourceAccount.AccountId);
            DestinationAccount = Accounts.Single(a => a.AccountId == hint.DestinationAccount.AccountId);
            SelectedType       = hint.Type;
        }
Ejemplo n.º 6
0
        protected AccountRelationshipDetailsBaseViewModel(
            IAccountService accountService,
            IAccountRelationshipService accountRelationshipService,
            int accountRelationshipId)
        {
            m_accountService             = accountService;
            m_accountRelationshipService = accountRelationshipService;

            m_accountRelationshipId = accountRelationshipId;

            Accounts = accountService.GetAllAsLinks();
            Types    = Enum.GetValues(typeof(AccountRelationshipType)).Cast <AccountRelationshipType>();
        }
Ejemplo n.º 7
0
        public AccountRelationshipEditViewModel(
            ILoggerFactory loggerFactory,
            IAccountService accountService,
            IAccountRelationshipService accountRelationshipService,
            int accountRelationshipId) : base(accountService, accountRelationshipService, accountRelationshipId)
        {
            m_logger = loggerFactory.CreateLogger <AccountRelationshipEditViewModel>();

            AccountRelationship accountRelationship = m_accountRelationshipService.Get(accountRelationshipId);

            SourceAccount      = Accounts.Single(a => a.AccountId == accountRelationship.SourceAccount.AccountId);
            DestinationAccount = Accounts.Single(a => a.AccountId == accountRelationship.DestinationAccount.AccountId);
            SelectedType       = accountRelationship.Type;
        }
Ejemplo n.º 8
0
 public AccountRelationshipListViewModelFactory(
     ILoggerFactory loggerFactory,
     IAccountRelationshipService accountRelationshipService,
     IAccountRelationshipItemViewModelFactory accountRelationshipItemViewModelFactory,
     IAccountRelationshipCreateViewService accountRelationshipCreateViewService,
     IAccountRelationshipEditViewService accountRelationshipEditViewService,
     IDeleteConfirmationViewService deleteConfirmationViewService)
 {
     m_loggerFactory = loggerFactory;
     m_accountRelationshipService = accountRelationshipService;
     m_accountRelationshipItemViewModelFactory = accountRelationshipItemViewModelFactory;
     m_accountRelationshipCreateViewService    = accountRelationshipCreateViewService;
     m_accountRelationshipEditViewService      = accountRelationshipEditViewService;
     m_deleteConfirmationViewService           = deleteConfirmationViewService;
 }