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(); }
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(); }
private void showAllBtn_Click(object sender, EventArgs e) { userDB db = new userDB(); showAllLbl.Text = db.ShowUsers(); }