예제 #1
0
        /// <summary>
        /// Check AcctType type is one of the supplied account tyes
        /// </summary>
        protected AcctType checkAcctType(int?type, params AcctType[] allowed)
        {
            Utils.Check(type != null, "Account Type missing");
            AcctType t = (AcctType)type;

            Utils.Check(Array.IndexOf(allowed, t) >= 0, "Cannot use this screen to edit {0}s", t.UnCamel());
            return(t);
        }
예제 #2
0
        private void PopulateAccounts(int[] acctNumbers, List <Account> a)
        {
            string[] banks =
            { "Republic Savings",            "AMCORE Bank Carpentersville",         "Broadway Bank",
              "First Choice Bank",           "South Carolina Federal Savings Bank",
              "Valley Bank Richland Center", "Trinity National Bank",
              "Glasgow Savings Bank",        "Gunnison Valley Bank",                "Little Falls Bank" };

            AcctType at = RandomAccount();

            for (int i = 0; i < acctNumbers.Length; i++)
            {
                if (RandomAccount() == AcctType.checking)
                {
                    a.Add(new Checking(acctNumbers[i], rand.Next(10, 3000), banks[i]));
                }
                else
                {
                    a.Add(new Savings(acctNumbers[i], rand.Next(10, 3000), banks[i]));
                }
            }
            PopulateTransactions(a);
        }
예제 #3
0
 public void setAccountType(AcctType type)
 {
     acct_type = type;
 }