if语句怎么连接数据库中表的任意变量 if(?????)
SqlConnection con = new SqlConnection(@"server=;uid=;pwd=;database=;");string username,pwd;
username = txtusername.Text;
pwd = mima.Text;
string strsql ="Select * From qq Where username = '" + txtusername.Text.Trim() + "' And pwd = '" + mima.Text.Trim() + "'";
if (txtusername.Text == "" && mima.Text == "")
{
MessageBox.Show("请检查密码是否正确");
}
else if (username!=null && mima!=null)
{
MessageBox.Show("验证成功");
}
else
{
MessageBox.Show("账号或密码不存在");
}