private void button2_Click(object sender, EventArgs e) { if (textBox4.Text == "" || textBox6.Text == "" || textBox5.Text == "" || textBox3.Text == "" || textBox2.Text == "" || textBox7.Text == "" || comboBox1.Text == "" || comboBox2.Text == "") { MessageBox.Show("Incomplete Information is Provided!"); } else if (textBox4.Text != textBox5.Text) { MessageBox.Show("Your Confirmation Password is Incorrect!"); textBox4.Text = null; } else { StudentsAffairsSystemServer.Service1 StudentsAffairsSystem = new StudentsAffairsSystemServer.Service1(); StudentsAffairsSystem.TeacherInfo(textBox6.Text, textBox3.Text, textBox2.Text, comboBox1.Text); StudentsAffairsSystem.TeacherRegister(textBox6.Text, textBox5.Text, textBox3.Text, textBox2.Text, comboBox1.Text, comboBox2.Text, textBox7.Text); MessageBox.Show("U have been Registered"); textBox6.Text = null; textBox5.Text = null; textBox3.Text = null; textBox2.Text = null; textBox7.Text = null; comboBox1.Text = null; comboBox2.Text = null; textBox4.Text = null; } }