Example #1
0
 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);
 }
Example #2
0
 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");
 }
Example #3
0
        //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++;
        }
Example #4
0
        private void OnCustomerAddedToRepository(object sender, CustomerAddedEventArgs e)
        {
            CustomerViewModel viewModel = new CustomerViewModel(e.NewCustomer, _customerRepository);

            AllCustomers.Add(viewModel);
        }