private void frmAccount_Load(object sender, EventArgs e) { if (_clientId > 0) { _clientRepository.FindClientById(_clientId); lblAccIban.Text = $"{_clientRepository.Client.BankAccount.Iban}"; txtAccName.Text = $"{_clientRepository.Client.BankAccount.AccountName}"; lblAccBalance.Text = $"{_clientRepository.Client.BankAccount.AccountBalance} €"; cmbLimit.Text = $"{_clientRepository.Client.BankAccount.AuthOverdraftLimit} €"; lblAccOpenDate.Text = $"{_clientRepository.Client.BankAccount.OpeningDate.Date.ToShortDateString()}"; txtClientName.Text = $"{_clientRepository.Client.Name}"; txtSurname.Text = $"{_clientRepository.Client.Surname}"; txtTitle.Text = $"{_clientRepository.Client.Title}"; txtBirthNumber1.Text = $"{_clientRepository.Client.BirthNumber.Substring(0, 6)}"; txtBirthNumber2.Text = $"{_clientRepository.Client.BirthNumber.Substring(6, 4)}"; txtIdCard.Text = $"{_clientRepository.Client.IdCardNumber}"; txtStreet.Text = $"{_clientRepository.Client.Street}"; txtCity.Text = $"{_clientRepository.Client.City}"; txtPhoneNum.Text = $"{_clientRepository.Client.PhoneNumber}"; } else { cmbLimit.SelectedIndex = 0; lblAccOpenDate.Text = DateTime.Now.ToShortDateString(); lblAccIban.Text = BankAccountLogic.GenerateIBAN(); } }
public UnitOfWork(ApplicationDbContext context) { _context = context; BankAccountRepo = new BankAccountRepository(context); CategoryRepo = new CategoryRepository(context); FinancialOperatiosRepo = new FinancialOperationRepository(context); BankAccountLogic = new BankAccountLogic(this); FinancialOperationService = new FinancialOperationService(this); SubcategoryService = new SubcategoryService(this); }