예제 #1
0
        public Bank(string name, bool Default)
        {
            this.Name = name;
            this.Default = Default;

            if (Default) DefaultBank = this;

            Banks.Add(this);
        }
예제 #2
0
        public Bank(string name, bool Default, float openfee, float initialholding, int interestinterval)
        {
            this.Name = name;
            this.Default = Default;
            this.OpenFee = openfee;
            this.IntialHolding = initialholding;
            this.InterestInterval = interestinterval;

            if (Default) DefaultBank = this;

            Banks.Add(this);
        }
예제 #3
0
        public bool PlayerAccount; //player(true), or a server(false) account

        #endregion Fields

        #region Constructors

        public Account(Bank bank, uint AccountID, bool PlayerAccount, string name, float interest)
        {
            this.bank = bank;
            this.PlayerAccount = PlayerAccount;
            this.Name = name;
            this.Interest = interest;

             	Account tempacc = FindAccount(AccountID);

            if (tempacc != null) AccountID = Accounts[Accounts.Count - 1].AccountID; //maybe pull from the db instead

            while(tempacc != null)
            {
                AccountID++;
                tempacc = FindAccount(AccountID);
            }

            this.AccountID = AccountID;

            Accounts.Add(this);
        }
예제 #4
0
        public Account(Bank bank, string name)
        {
            uint accountid;

            this.bank = bank;
            this.PlayerAccount = true;
            this.Name = name;
            this.Interest = this.bank.DefaultInterest;

            Account tempacc = FindAccount(Accounts[Accounts.Count - 1].AccountID); //TODO: Find the last entry in DB
            accountid = tempacc.AccountID;

            while(tempacc != null)
            {
                accountid++;
                tempacc = FindAccount(accountid);
            }

            this.AccountID = accountid;

            Accounts.Add(this);
        }