// buttun sing up form deaf private void button2_Click(object sender, EventArgs e) { deaf d = new deaf(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text, textBox5.Text); if (d.insertDeaf()) { this.Hide(); deafPage dd = new deafPage(); dd.Closed += (s, args) => this.Close(); dd.Show(); } else { MessageBox.Show(" the Deaf is exsist !!!!!!"); } }
//add deaf Button private void button1_Click(object sender, EventArgs e) { deaf d = new deaf(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text, textBox5.Text); if (d.insertDeaf()) { MessageBox.Show(" The deaf is added !!!!!!"); //clean botton textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; } else { MessageBox.Show(" the Deaf is exsist !!!!!!"); } }