public StatementsController(ks54AISContext _context) { //this.context = _context; groupRepository = new GroupRepository(_context); excelHelper = new ExcelHelper(_context); statementRepository = new StatementRepository(_context); }
public StatementForm(Form f) { InitializeComponent(); personRepository = PersonRepository.GetRepository(); documentRepository = DocumentRepository.GetRepository(); typePensyRepository = TypePensyRepository.GetRepository(); statementRepository = StatementRepository.GetRepository(); }
public InformationAboutPersonForm(string INN) { InitializeComponent(); personRepository = PersonRepository.GetRepository(); documentRepository = DocumentRepository.GetRepository(); typePensyRepository = TypePensyRepository.GetRepository(); statementRepository = StatementRepository.GetRepository(); this.INN = INN; }
private void ConfigurateRepositories(string connectionString) { DocumentRepository.Configure(connectionString); PersonRepository.Configure(connectionString); TypePensyRepository.Configure(connectionString); StatementRepository.Configure(connectionString); LgoteRepository.Configure(connectionString); PricazRepository.Configure(connectionString); }
public int UpDateStatement(StatementDTO data) { try { var A = new StatementRepository(); return(A.Update(data)); } catch (Exception e) { throw new FaultException <Exception>(e); } }
public StatementDTO GetRecordByReq(string req) { try { var A = new StatementRepository(); return(A.GetRecordByReq(req)); } catch (Exception e) { throw new FaultException <Exception>(e); } }
public StatementDTO GetStatementBankRecord(int id) { try { var A = new StatementRepository(); return(A.GetRecord(id)); } catch (Exception e) { throw new FaultException <Exception>(e); } }
public List <StatementDTO> DataStatementByIBAN(string IBAN) { try { var A = new StatementRepository(); return(A.DataStatementByIBAN(IBAN)); } catch (Exception e) { throw new FaultException <Exception>(e); } }
public StatementService( StatementDepositValidator statementDepositValidator, AccountRepository accountRepository, StatementRepository statementRepository, IOptions <AppSettings> appSettings) { _statementDepositValidator = statementDepositValidator; _accountRepository = accountRepository; _statementRepository = statementRepository; _appSettings = appSettings.Value; }
public TransactionService( AccountRepository accountRepository, StatementRepository statementRepository, TransactionRepository transactionRepository, TransactionTransferMoneyValidator transferMoneyValidator, IOptions <AppSettings> appSettings ) { _accountRepository = accountRepository; _statementRepository = statementRepository; _transactionRepository = transactionRepository; _transferMoneyValidator = transferMoneyValidator; _appSettings = appSettings.Value; }
public void GetDetails() { this.Statements = new List <StatementViewModel>(); using (StatementRepository statementRep = new StatementRepository()) { decimal previousamount = 0; statementRep .GetByBudget(this.BudgetID) .ToList() .ForEach(s => { this.Statements.Add(new StatementViewModel(s, previousamount)); previousamount += s.WithdrawAmount; }); } }
public void ShouldProvideStatementsForCustomer() { var repository = new StatementRepository(); var c1 = new Customer("One"); var c2 = new Customer("Two"); var statement = new Statement(c1); repository.Add(statement); repository.Add(new Statement(c2)); var c1statements = repository.FindByCustomer(c1); Assert.That(c1statements.Contains(statement)); Assert.That(c1statements.Count(), Is.EqualTo(1)); }
public async Task GetPastPendingStatement() { // Arrange testsUtils.CleanAll(); int categoryId = testsUtils.AddSingleCategory(); dbUtils.Insert(new DbStatementDto() { Amount = 104, CategoryId = categoryId, Direction = 0, DueDate = DateTime.Parse("2018-04-15") }); dbUtils.Insert(new DbStatementDto() { Amount = 204, CategoryId = categoryId, Direction = 0, DueDate = DateTime.Parse("2018-04-20"), Paid = true, PaymentDate = DateTime.Parse("2018-04-20") }); dbUtils.Insert(new DbStatementDto() { Amount = 105, CategoryId = categoryId, Direction = 0, DueDate = DateTime.Parse("2018-05-15") }); dbUtils.Insert(new DbStatementDto() { Amount = 205, CategoryId = categoryId, Direction = 0, DueDate = DateTime.Parse("2018-05-20"), Paid = true, PaymentDate = DateTime.Parse("2018-05-20") }); dbUtils.Insert(new DbStatementDto() { Amount = 106, CategoryId = categoryId, Direction = 0, DueDate = DateTime.Parse("2018-06-15") }); dbUtils.Insert(new DbStatementDto() { Amount = 206, CategoryId = categoryId, Direction = 0, DueDate = DateTime.Parse("2018-06-20"), Paid = true, PaymentDate = DateTime.Parse("2018-06-20") }); var sut = new StatementRepository(dbUtils.DbContext); // Act var statementList = await sut.GetList(MonthYear.Create(2018, 5)); // Assert Assert.Equal(3, statementList.Count); Assert.Contains(statementList, x => x.Amount == 104); Assert.Contains(statementList, x => x.Amount == 105); Assert.Contains(statementList, x => x.Amount == 205); }
public void SetUp() { customer = new Customer(); repository = new StatementRepository(); controller = new StatementsController(repository, customer); }
public StatementsController(StatementRepository repository, Customer customer) { this.repository = repository; this.customer = customer; }
public StatementsController() { _statementRepository = new StatementRepository(); }