我贴下源码吧!我实在是判断不下去了!
SqlConnection con=db.con();
con.Open();
SqlCommand cmd=new SqlCommand("select * from user where username='"+txtusername.Text+"' and userpwd='"+txtuserpwd+"'",con);
//然后就判断不知道如何判断....
如果相同就执行
this.Panel1.Visible=false;
this.Panel2.Visible=true;
不相同就执行一个错误信息!