Пример #1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            userDB db = new userDB();

            db.updateUserbyUsername(txtUUsername.Text, txtUPassword.Text, txtUfullname.Text, txtUAdminQ.Text, txtIdUpdate.Text);
            usersULbl.Text = db.ShowUsers();
        }
Пример #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            userDB db = new userDB();

            if (txtUsername.Text != "" && txtPassword.Text != "" && txtFname.Text != "" && txtAdminQ.Text != "")
            {
                db.insertUser(txtUsername.Text, txtPassword.Text, txtFname.Text, txtAdminQ.Text);
            }
            else
            {
                MessageBox.Show("All fields must be filled!", "Some Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            usersLbl.Text = db.ShowUsers();
        }
Пример #3
0
        private void showAllBtn_Click(object sender, EventArgs e)
        {
            userDB db = new userDB();

            showAllLbl.Text = db.ShowUsers();
        }