this.sqlConnection1.Open();   
  this.sqlSelectCommand1.CommandText="select   *   from   注册信息表   where   学号='"+this.textBox1.Text.Trim()+"'";   
  this.sqlSelectCommand1.ExecuteNonQuery();   
  this.dataSet11.Clear();   
  this.sqlDataAdapter1.Fill(this.dataSet11);   
  SqlDataReader   dr=this.sqlSelectCommand1.ExecuteReader();   
    
  while(dr.Read())  
   { 
    
  if   (this.textBox2.Text.Trim()==dr.GetValue(5).ToString())   
  {   
  MessageBox.Show("登陆成功");   
  选课查询   xkcx=new   选课查询();   
  xkcx.Show();   
  }   
  else   if(this.textBox1.Text.Trim()==null&&this.textBox2.Text.Trim()==null)   
  {   
  MessageBox.Show("请输入完整登陆信息");   
  }   
  else   
  {   
  MessageBox.Show("对不起,你的帐号或密码错误!!");   
  }   
}