Ejemplo 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();
        }
Ejemplo 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 = "";
        }
Ejemplo n.º 3
0
        private void showDelAccountBtn_Click(object sender, EventArgs e)
        {
            accountDB db = new accountDB();

            showDelAccountsLbl.Text = db.ShowAccounts();
        }