public Transaction_Value(Transaction parent, string formNm, string type)
 {
     InitializeComponent();
     this.transactionParentForm = parent;
     this.formName = formNm;
     this.transType = type;
     this.user = this.transactionParentForm.SelectAccParentForm.LoginParentForm.currentUserLogin;
 }
        private void createTransactionForm(string accountType)
        {
            //get balance of "accountType" account for current user.
            string balanceToDisplay = accountType + " Balance: ";

            foreach (Account account in (LoginParentForm.currentUserLogin.accounts))
            {
                if (account.getType() == accountType)
                {
                    balanceToDisplay += account.getBalance().ToString("C");
                }
            }

            String formTitle = LoginParentForm.currentUserLogin.getName() + " - " + accountType;

            //create the transaction for using constructor method and above strings
            Transaction transactionForm = new Transaction(this, formTitle, balanceToDisplay, accountType );
            transactionForm.Show();
            this.cheque_button.Checked = false;
            this.savings_button.Checked = false;
            this.term_deposit_button.Checked = false;
            this.Hide();
        }