{
bool bSuccess = false;
Password =
FormsAuthentication.HashPasswordForStoringInConfigFile(Password,
"SHA1");
OleDbCommand oleCommand = new OleDbCommand("SELECT * FROM Users" + " WHERE UserName='" + txtUserName.Text + "'", oledbUsers);
try
{
oledbUsers.Open();
OleDbDataReader rdrUsers = oleCommand.ExecuteReader();
while (rdrUsers.Read())
{
if (Password == rdrUsers["Password"].ToString())
bSuccess = true;
}
oledbUsers.Close();
}
catch
{
bSuccess = false;
oledbUsers.Close();
}
return bSuccess;
}
» Tin mới nhất:
» Các tin khác: