Beispiel #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            HeThong form1 = new HeThong();

            form1.Show();
            this.Hide();
        }
Beispiel #2
0
        private void quayLạiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HeThong form2 = new HeThong();

            form2.Show();
            this.Hide();
        }
Beispiel #3
0
        private void btn_login_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(conn);

            con.Open();
            SqlCommand cmd  = new SqlCommand("select count(*) from NguoiDung where Taikhoan = '" + txt_taikhoan.Text + "'and Matkhau = '" + txt_matkhau.Text + "'", con);
            int        temp = Convert.ToInt32(cmd.ExecuteScalar().ToString());

            con.Close();
            if (temp == 1)
            {
                MessageBox.Show("Đăng nhập thành công!");
                HeThong form1 = new HeThong();
                form1.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Sai tên tài khoản hoặc mật khẩu!");
            }
        }