Example #1
0
        public void ShowBranch()
        {
            lstBranches.Items.Clear();
            branchesList     = Bank.GetBranches();
            branchDictionary = new Dictionary <string, Branch> {
            };

            for (int i = 0; i < branchesList.Count(); i++)
            {
                branchDictionary.Add(branchesList[i].Address.ToString(), branchesList[i]);
                lstBranches.Items.Add(branchesList[i].Address);
            }
            //Bank.WriteToXML();
            Bank.WriteToXML();
        }
Example #2
0
        public void ShowAccounts()
        {
            lstAccounts.Items.Clear();
            if (customer != null)
            {
                accountList = customer.GetAccounts();
            }
            accountDictionary = new Dictionary <string, Account> {
            };

            for (int i = 0; i < accountList.Count(); i++)
            {
                accountDictionary.Add(accountList[i].AccountNumber.ToString(), accountList[i]);
                lstAccounts.Items.Add(accountList[i].AccountNumber.ToString());
            }
            Bank.WriteToXML();
        }
Example #3
0
        public void ShowCustomers()
        {
            lstCustomers.Items.Clear();
            if (branch != null)
            {
                customerList = Branch.GetCustomers();
            }
            customerDictionary = new Dictionary <string, Customer> {
            };

            for (int i = 0; i < customerList.Count(); i++)
            {
                customerDictionary.Add(customerList[i].ToString(), customerList[i]);
                lstCustomers.Items.Add(customerList[i].ToString());
            }
            Bank.WriteToXML();
        }
Example #4
0
 private void CustomerForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     Bank.WriteToXML();
     Application.Exit();
 }
Example #5
0
 private void saveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Bank.WriteToXML();
 }