private void listView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (deleteMode)
                {
                    var confirm = new DialogConfirm();
                    confirm.setDialogText("Are you sure you want to delete this customer? This action cannot be undone.");
                    confirm.ShowDialog();

                    if (confirm.DialogResult == DialogResult.Yes)
                    {
                        //master.deleteUser();
                        deleteMode = false;
                    }
                }
                else
                {
                    var person = listView1.SelectedItems[0].Text;
                    var search = new Search.SearchThroughAccount();
                    search.ForExactAccountNumber(master.getMasterBank().getBankServices(), long.Parse(person));

                    master.setAccount(search.AccountSearchResults[0]);
                    master.updateView(1);
                }
            } catch { }
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            var confirm = new DialogConfirm();

            confirm.ShowDialog();

            if (confirm.DialogResult == DialogResult.Yes)
            {
                master.updateView(10);
            }
        }
Beispiel #3
0
        private void cancel_Click(object sender, EventArgs e)
        {
            var confirm = new DialogConfirm();

            confirm.ShowDialog();

            if (confirm.DialogResult == DialogResult.Yes)
            {
                this.DialogResult = DialogResult.Cancel;
                masterForm.updateView(10);
            }
        }
Beispiel #4
0
        private void closeAccount_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var confirm = new DialogConfirm();

            confirm.setDialogText("Are you sure you want to close this account? This action cannot be undone.");
            confirm.ShowDialog();

            if (confirm.DialogResult == DialogResult.Yes)
            {
                masterForm.getMasterBank().getBankServices().closeAccount(masterForm.getAccount());
                masterForm.updateView(0);
            }
        }