Esempio n. 1
0
 public CashflowAgent(
                 ICashflowFactory cashflowFactory,
                 ICashflowRepository cashflowRepository,
                 IDialogService dialogService,
                 ICashflowEditorViewModelFactory cashflowEditorViewModelFactory
                 )
 {
     this.cashflowFactory = cashflowFactory;
     this.cashflowRepository = cashflowRepository;
     this.dialogService = dialogService;
     this.cashflowEditorViewModelFactory = cashflowEditorViewModelFactory;
 }
 public BackgroundTask(
     IAccountRepository accountsRepository,
     ICategoryRepository categoriesRepository,
     ICashflowRepository cashflowRepository,
     ITransactionRepository transactionRepository,
     ILogger <BackgroundTask> logger
     )
 {
     _accountsRepository    = accountsRepository;
     _categoriesRepository  = categoriesRepository;
     _cashflowRepository    = cashflowRepository;
     _transactionRepository = transactionRepository;
     _logger = logger;
 }
Esempio n. 3
0
        public CashflowEditorViewModel(
            ICashflowRepository cashflowRepository,
            IBankAccountRepository bankAccountRepository,
            Cashflow entity
            )
        {
            this.cashflowRepository    = cashflowRepository;
            this.bankAccountRepository = bankAccountRepository;
            this.entity = entity;

            this.OpeningBalance.PropertyChanged += (s, e) =>
            {
                base.Validate();
            };
            base.ValidationHelper.AddInstance(this.OpeningBalance);
        }
        public CashflowEditorViewModel(
                ICashflowRepository cashflowRepository,
                IBankAccountRepository bankAccountRepository,
                Cashflow entity
            )
        {
            this.cashflowRepository = cashflowRepository;
            this.bankAccountRepository = bankAccountRepository;
            this.entity = entity;

            this.OpeningBalance.PropertyChanged += (s,e) =>
                {
                    base.Validate();
                };
            base.ValidationHelper.AddInstance(this.OpeningBalance);
        }
        public void Initialize()
        {
            //repository = container.Resolve<IRepositoryRead<Core.Entities.Cashflow>>();
            //repository = container.Resolve<IRepositoryWrite<Core.Entities.Cashflow>>();
            repository = container.Resolve<ICashflowRepository>();

            testEntity = new Core.Entities.Cashflow(null)
            {
                Name = "cflow-" + Guid.NewGuid().ToString(),
                OpeningBalance = 123M,
                StartDate = DateTime.Now.Date,
                CashflowBankAccounts = new List<Core.Entities.CashflowBankAccount>() {
                        new Core.Entities.CashflowBankAccount() { BankAccount=new Core.Entities.BankAccount() { BankAccountId=1 } },
                        new Core.Entities.CashflowBankAccount() { BankAccount=new Core.Entities.BankAccount() { BankAccountId=2 } }
                            }
            };
        }
Esempio n. 6
0
 public Handler(IUserContext userContext, ICashflowRepository cashflowRepository, ILogger <Handler> logger)
 {
     _userContext        = userContext;
     _cashflowRepository = cashflowRepository;
     _logger             = logger;
 }