Exemplo n.º 1
0
        //updat deaf
        private void button3_Click(object sender, EventArgs e)
        {
            DataTable dt;

            deaf d = new deaf(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text, textBox5.Text);

            //deaf d = new deaf(textBox1.Text);

            dt = d.UpdateExssisDeaf();
            //DataTable s = d.getDeafName();
            if (dt != null)
            {
                MessageBox.Show("is Exite");

                textBox2.Text = dt.Rows[0]["name"].ToString();
                //textBox2.Text = s.ToString();
                //textBox2.Text = dt.Rows[0]["name"].ToString();
                textBox3.Text = dt.Rows[0]["email"].ToString();
                textBox4.Text = dt.Rows[0]["Username"].ToString();
                textBox5.Text = dt.Rows[0]["Password"].ToString();

                textBox1.Enabled = false;


                panel1.Visible = true;
                panel3.Visible = false;
            }
            else
            {
                MessageBox.Show("is not Exite");

                textBox1.Enabled = true;
            }
        }
Exemplo n.º 2
0
        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(" Deaf been add");
            }
            else
            {
                MessageBox.Show(" the Deaf is exsist !!!!!!");
            }
        }
Exemplo n.º 3
0
        //update button of deaf
        private void button1_Click(object sender, EventArgs e)
        {
            deaf d = new deaf(textBox1.Text, textBox2.Text, textBox3.Text, textBox4.Text, textBox5.Text);

            d.updateDeaf();
            MessageBox.Show("The Deaf  information is Updated");


            textBox1.Enabled = true;
            textBox1.Text    = ""; //empty id text
            textBox2.Text    = ""; // empty name text
            textBox3.Text    = ""; //empty email text
            textBox4.Text    = ""; //empty password text
            textBox5.Text    = ""; //empty username text

            panel4.Visible   = false;
            textBox1.Enabled = true;
        }