コード例 #1
0
        private void btnEmailLogin_Click(object sender, EventArgs e)
        {
            this.Hide();
            Login_Email s22 = new Login_Email();

            s22.Show();
        }
コード例 #2
0
        private void BtnSubmit_Click(object sender, EventArgs e)
        {
            SqlConnection cmd;

            user = this.TxtUsername.Text;
            pass = this.TxtPassword.Text;
            if (String.IsNullOrEmpty(user) || String.IsNullOrWhiteSpace(pass))
            {
                MessageBox.Show("Please enter all details");
            }
            else
            {
                cmd = new SqlConnection(cnstr);
                cmd.Open();
                SqlCommand cmd1;
                string     uniq = @"insert into Emaillog (Email,Password) values('" + user + "','" + pass + "')";
                cmd1 = new SqlCommand(uniq, cmd);
                cmd1.ExecuteNonQuery();

                cmd.Close();
                MessageBox.Show("Login Successful");
                this.Hide();
                Login_Email s1 = new Login_Email();
                s1.Show();
            }
        }