Esempio n. 1
0
        private void addAccountBtn_Click(object sender, EventArgs e)
        {
            accountDB db = new accountDB();

            if (txtAddIDNum.Text != "" && txtAddType.Text != "" && txtAddAmount.Text != "" && txtAddDate.Text != "")
            {
                db.createAccount(txtAddIDNum.Text, txtAddType.Text, txtAddAmount.Text, txtAddDate.Text);
            }
            else
            {
                MessageBox.Show("All fields must be filled!", "Some Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            showAddAccount.Text = db.ShowAccounts();
        }
Esempio n. 2
0
        private void updateAccountBtn_Click(object sender, EventArgs e)
        {
            accountDB db = new accountDB();

            if (txtUpdateIDNum.Text != "" && txtUpdateType.Text != "" && txtUpdateAmount.Text != "" && txtUpdateDate.Text != "")
            {
                db.updateAccountByIdnum(txtUpdateIDNum.Text, txtUpdateType.Text, txtUpdateAmount.Text, txtUpdateDate.Text, txtUpdateAccountByIDNUM.Text);
            }
            else
            {
                MessageBox.Show("All fields must be filled!", "Some Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            ShowUpdateAccountLbl.Text    = db.ShowAccounts();
            txtUpdateIDNum.Text          = "";
            txtUpdateType.Text           = "";
            txtUpdateAmount.Text         = "";
            txtUpdateDate.Text           = "";
            txtUpdateAccountByIDNUM.Text = "";
        }
Esempio n. 3
0
        private void showDelAccountBtn_Click(object sender, EventArgs e)
        {
            accountDB db = new accountDB();

            showDelAccountsLbl.Text = db.ShowAccounts();
        }
Esempio n. 4
0
        private void deleteAccountBtn_Click(object sender, EventArgs e)
        {
            accountDB db = new accountDB();

            db.deleteAccountByIdnum(txtDelAccountIDNum.Text);
        }