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(); }
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 = ""; }
private void showDelAccountBtn_Click(object sender, EventArgs e) { accountDB db = new accountDB(); showDelAccountsLbl.Text = db.ShowAccounts(); }
private void deleteAccountBtn_Click(object sender, EventArgs e) { accountDB db = new accountDB(); db.deleteAccountByIdnum(txtDelAccountIDNum.Text); }