private void Button5_Click(object sender, EventArgs e)
        {
            this.Hide();
            mainpage MP = new mainpage();

            MP.Show();
        }
        private void Button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            mainpage mp = new mainpage();

            mp.Show();
        }
示例#3
0
        private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Hide();
            mainpage mp = new mainpage();

            mp.Show();
        }
示例#4
0
        private void Button1_Click(object sender, EventArgs e)
        {
            connection = CommonMethods.GetConnectionString();
            SqlConnection con = new SqlConnection(connection);

            con.Open();
            string email    = txtemail.Text;
            string password = txtusername.Text;

            string mobile   = txtmobileno.Text;
            string Username = textBox1.Text;

            DataTable  dt  = new DataTable();
            SqlCommand cmd = con.CreateCommand();

            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "insert into addinguser(name,mobileno,email,username,password,conform_password)values('" + txtname.Text + "','" + txtmobileno.Text + "','" + txtemail.Text + "','" + textBox1.Text + "','" + txtusername.Text + "','" + txtpassword.Text + "')";

            if (Username == "mayank123")
            {
                errorProvider1.SetError(textBox1, "USERNAME ALRESDY EXISTS");
            }
            else
            {
                errorProvider1.Dispose();
            }

            if (mobile.Length != 10)
            {
                MessageBox.Show("mobile number should contains only 10 digits");
            }
            if (usermail(email) >= 1)
            {
            }

            if (password.Length >= 10 && numberPass(password) >= 1 && upperCase(password) >= 1)
            {
                if (txtusername.Text != txtpassword.Text)
                {
                    MessageBox.Show("password does not match");
                }
                else
                {
                    cmd.ExecuteNonQuery();
                    con.Close();

                    MessageBox.Show("registered successfully");



                    this.Hide();
                    mainpage m = new mainpage();
                    m.Show();
                }
            }
            else
            {
                MessageBox.Show("PASSWORD IS INVALID" +
                                "MUST CONTAIN MINIMUM 1 UPPERCASE, 1 DIGIT AND PASSWORD MUST BE GREATER THAN 10");
            }
        }