예제 #1
0
        private void btnDangky_Click(object sender, EventArgs e)
        {
            try
            {
                command = connection.CreateCommand();
                string taiKhoan = txtTaikhoan.Text;
                string matKhau  = txtMatkhau.Text;
                command.CommandText = "INSERT INTO DANGNHAP (TaiKhoan, MatKhau) VALUES ('" + taiKhoan + "', '" + matKhau + "')";
                command.ExecuteNonQuery();

                this.Hide();
                DangNhap dangNhap = new DangNhap();
                dangNhap.ShowDialog();
            }
            catch (Exception)
            {
                MessageBox.Show("Lỗi kết nối");
            }
        }