private void CurrentAccountListBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string  accName = CurrentAccountListBox1.SelectedItem.ToString();
            Decimal bal     = accServices.GetAccountBalance(accName);

            AccountBalTextBox.Text = bal.ToString();
        }
        private void currentlbox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string  accName = lbxCurrent.SelectedItem.ToString();    //get the account name
            Decimal balance = accService.GetAccountBalance(accName); //get the balance for the account

            txtBalance.Text = balance.ToString();                    //put the balance in the balance text box
        }
예제 #3
0
        /// <summary>
        /// Account listbox item selected
        /// Find the account and update the balance displayed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void listBoxAccounts_SelectedIndexChanged(object sender, EventArgs e)
        {
            string  accName = listBoxAccounts.SelectedItem.ToString();
            decimal balance = accService.GetAccountBalance(accName);

            txtBalance.Text = balance.ToString();
        }
        private void lstBox_CurrentAccts_SelectedIndexChanged(object sender, EventArgs e)
        {
            string  acctName = lstBox_CurrentAccts.SelectedItem.ToString();
            Decimal balance  = accService.GetAccountBalance(acctName);

            // adds balance to txtBox_Balance
            txtBox_Balance.Text = balance.ToString();
        }
예제 #5
0
        /// <summary>
        /// Account listbox item selected
        /// Find the account and update the balance displayed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void listBoxAccounts_SelectedIndexChanged(object sender, EventArgs e)
        {
            string  accName = listBoxAccounts.SelectedItem.ToString();
            decimal balance = accService.GetAccountBalance(accName);
            int     reward  = accService.GetRewardPoints(accName);

            txtBalance.Text = balance.ToString();
            txtReward.Text  = reward.ToString();

            btnDeposit.Enabled    = true;
            btnWithDrawal.Enabled = true;
        }
        // updates the amount displayed balance text box
        private void updateBalanceText()
        {
            string  selectedAcct = currentAcctsList.SelectedItem.ToString();
            decimal bal          = acctServices.GetAccountBalance(selectedAcct);

            balanceTxt.Text = bal.ToString();
        }
        /// <summary>
        /// Updates the amount displayed in the balance text box
        /// </summary>
        /// <param name="accName"></param>
        private void updateBalanceText(string accName)
        {
            decimal balance = accService.GetAccountBalance(accName);

            txtBalance.Text = balance.ToString();
        }