public Customer(string firstName, string lastName, string email, string password) { FirstName = firstName; LastName = lastName; Email = email; CustomerId = customerId; customerId += 1; Password = password; AllCustomers.Add(this); }
public BankAccount(Customer customer, decimal initialDeposit, string accountType) { CustomerName = $"{customer.FirstName} {customer.LastName}"; AccountType = accountType; AccountNumber = accountNumber; CustomerId = customer.CustomerId; accountNumber += 123; AllBankAccounts.Add(this); AllCustomers.Add(customer); MakeDeposite(this, initialDeposit, DateTime.Now, "initial Deposit"); }
//Constructor for the Bank public Bank(Customer customer, decimal initialDeposit, string accountType, DateTime date) { CustomerName = $"{customer.FirstName} {customer.LastName}"; AccountNumber = accountNumber; AccountBalance = initialDeposit; AccountType = accountType; Date = date; Note = "Initial Deposit"; AllCustomers.Add(customer); MakeDeposit(initialDeposit, customer, "Inital Deposit"); accountNumber++; }
private void OnCustomerAddedToRepository(object sender, CustomerAddedEventArgs e) { CustomerViewModel viewModel = new CustomerViewModel(e.NewCustomer, _customerRepository); AllCustomers.Add(viewModel); }