Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by 123123 ( 13 years ago )
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("Some textfields are missing!");
}
else
{
sqlQuery = "Select * from UserDetails where UserName = '" + textBox1.Text + "' AND PassWord = '" + textBox2.Text + "'";
cmd.CommandText = sqlQuery;
cmd.Connection = cn;
OleDbDataReader dr2;
dr2 = cmd.ExecuteReader();
dr2.Read();
if (dr2.HasRows)
{
MessageBox.Show("Logged in!");
//bww.label2.Text = SendText;
bww = new BankWelcome();
bww.label2.Text = SendText;
bww.StartPosition = FormStartPosition.CenterScreen;
this.Hide();
bww.ShowDialog();
this.Close();
}
else
{
MessageBox.Show("Username or Password is incorrect!");
}
dr2.Close();
dr2.Dispose();
}
Revise this Paste