private void AddBooks_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox3.Text == "" || textBox2.Text == "")//validation part { MessageBox.Show("Please, insert all values"); } else { int r = EmC.AddBranch(id, textBox1.Text, textBox3.Text, Convert.ToInt32(textBox2.Text)); if (r == 0) { MessageBox.Show("Your Request is Invalid"); } else { MessageBox.Show("New Branch is Added!"); } } }