private void button1_Click(object sender, EventArgs e) { int t = controllerObj.AddDepartment(textBox1.Text, comboBox1.Text); if (t >= 1) { MessageBox.Show("Department added"); } else { MessageBox.Show("Failed, maybe department_name exists or missing data to fill"); } }