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

            AllCustomers.Add(viewModel);
        }