i am create login form in that i have active/inactive combobox from where admin select active and inactive value and active and inactive user.
how can i check this at the time of login.i check with username and password how i check with if user is active or not.how can i check with username and password.
const string query1 = ("Select * from emp_tracker_username where username=@username and password=@password");
OleDbCommand cmd1 = new OleDbCommand(query1, cn1);
cmd1.Parameters.AddWithValue("@username", txtusername.Text);
cmd1.Parameters.AddWithValue("@password", txtpassword.Text);
OleDbDataAdapter ad1 = new OleDbDataAdapter(cmd1);
DataSet dt1 = new DataSet();
ad1.Fill(dt1);
if (dt1.Tables[0].Rows.Count > 0)
{
Form f4 = new frmCorporateNewid();
f4.Show();
this.Hide();
}
else
{
MessageBox.Show("Login Unsucessful...!");
}