Ejemplo n.º 1
0
        private void bShow_Click(object sender, EventArgs e)
        {
            AccountList accountList = AccountList.GetAccountList();

            output.Text += string.Concat(Environment.NewLine,
                                         "___List___", Environment.NewLine, accountList.GetList(), "__________", Environment.NewLine);
        }
Ejemplo n.º 2
0
        private void bCommit_Click(object sender, EventArgs e)
        {
            AccountList accountList = AccountList.GetAccountList();

            if (accountList.Commit(Convert.ToInt32(tbNumber.Text), Convert.ToInt32(tbAmount.Text)) == 0)
            {
                //TODO: Logger
                MessageBox.Show("There is no account with this number ");
            }
        }
Ejemplo n.º 3
0
 private void bSerialize_Click(object sender, EventArgs e)
 {
     try
     {
         AccountList list = AccountList.GetAccountList();
         list.SerialData();
     }
     catch
     {
         MessageBox.Show("Export error", "Deserialization");
     }
 }
Ejemplo n.º 4
0
        private void bSort_Click(object sender, EventArgs e)
        {
            AccountList accountList = AccountList.GetAccountList();

            if (accountList.Sort(cbSortType.SelectedIndex).Equals(1))
            {
                output.Text += string.Concat("Sorted ", cbSortType.Text, Environment.NewLine,
                                             "___List___", Environment.NewLine, accountList.GetList(), "__________", Environment.NewLine);
            }
            else
            {
                MessageBox.Show("Choose sort type", "error");
            }
        }
Ejemplo n.º 5
0
        private void bRegister_Click(object sender, EventArgs e)
        {
            ValidateRegistration();
            Owner       owner   = new Owner(tbName.Text, dt.Value);
            BankAccount account =
                BankAccount.GetBankAccount(cbType.SelectedIndex, owner, cbSMS.Checked, cbinternetBanking.Checked);

            if (account == null)//TODO:(validation)
            {
                MessageBox.Show("You must select account type");
                return;
            }
            AccountList accountList = AccountList.GetAccountList();

            accountList.Add(account);
            MessageBox.Show("Account with name: " + tbName.Text + " has been registered", "Registration");
            ClearAfterRegistration();
        }
Ejemplo n.º 6
0
        private void bSave_Click(object sender, EventArgs e)
        {
            AccountList accountList = AccountList.GetAccountList();

            accountList.SerialData(1);
        }
Ejemplo n.º 7
0
        private void pbSearch_Click(object sender, EventArgs e)
        {
            AccountList accountList = AccountList.GetAccountList();

            tbOutput.Text = accountList.Search(cbRegex.Checked, tbSearch.Text);
        }
Ejemplo n.º 8
0
        void timer_Tick(object sender, EventArgs e)
        {
            AccountList accountList = AccountList.GetAccountList();

            toolStripStatusLabel2.Text = onTick + accountList.Count();
        }
Ejemplo n.º 9
0
        private void bShow_Click(object sender, EventArgs e)
        {
            AccountList accountList = AccountList.GetAccountList();

            output.Text += accountList.GetList() + Environment.NewLine;
        }