{
	            string chuoiketnoi = @"server =SCD081815; database = thuchanh;integrated security=true;";
	            SqlConnection ketnoi = new SqlConnection();
	            ketnoi.ConnectionString = chuoiketnoi;
	            ketnoi.Open();
	            SqlCommand lenh = new SqlCommand();
	            lenh.Connection = ketnoi;
	            lenh.CommandText = string.Format("select count(*) from Sinhvien where masv ='{0}' and pass = '{1}'", textBox1.Text, textBox2.Text);
	            SqldataReader reader = lenh.ExecuteReader();
	            if (reader.HasRow==true)
	                MessageBox.Show("Đang nhập thành công");
	            else
	                MessageBox.Show("Đang nhập thất bại");
	            ketnoi.Close();
}
» Tin mới nhất:
» Các tin khác: