private void add_admin_button_Click(object sender, EventArgs e) { if (nameTextBox.Text == "" || usernameTextBox.Text == "" || passwordTextBox.Text == "") { MessageBox.Show("Please, insert all specified values."); } else { int r = controllerObj.A_AddAdmin(nameTextBox.Text.ToString(), usernameTextBox.Text.ToString(), passwordTextBox.Text.ToString()); if (r > 0) { MessageBox.Show("Admin added successfully."); DataTable dt = controllerObj.SelectAdmin_name_id(); adminsComboBox.DataSource = dt; adminsComboBox.DisplayMember = "Name"; adminsComboBox.ValueMember = "AID"; } else { MessageBox.Show("Error in adding admin."); } } }