Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length < 5 || !textBox2.Text.Contains("@gmail.com") || !textBox3.Text.Contains("!"))
            {
                MessageBox.Show("your name should be of length 5, email must contain @gmail.com , password must have one ! symbol");
            }
            else
            {
                server.Service1 myserver = new server.Service1();
                myserver.adminreg(textBox1.Text, textBox2.Text, textBox3.Text);

                MessageBox.Show("admin registered");
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length < 5 || textBox1.Text == "")
            {
                MessageBox.Show("ENTER YOUR NAME OF ATLEAST 5 CHARACTERS.");
            }
            else if (!textBox2.Text.Contains("@gmail.com") || textBox2.Text == "")
            {
                MessageBox.Show("PLEASE!! ENTER A VALID EMAIL.");
            }
            else if (!textBox3.Text.Contains("!") || textBox3.Text == "")
            {
                MessageBox.Show("YOUR PASSWORD MUST HAVE A ! SYMBOL.");
            }

            else
            {
                server.Service1 myserver = new server.Service1();
                myserver.adminreg(textBox1.Text, textBox2.Text, textBox3.Text);

                MessageBox.Show("WAO!! YOU ARE REGISTERED. ");
            }
        }