Example #1
0
        //List of random Account numbers generated
        //private static List<String> allAccountsID= new List<string>();

        //returns the account info
        public String createAccount(Customer c, String accountNumber)
        {
            try
            {
                //new customer: so add them to database
                if (!doesEmailExistInBank(c.email))
                {
                    customers.Add(c.email, c);
                    //allBankID.Add(c.email);
                }
                //everytime this function is called an account is created
                allAccountsID.Add(accountNumber, c.email);
                return(c.ToString(accountNumber));
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally { }
        }