public int login(string User,string Password)
{
DBConnection.Open();
DBCommand.CommandText = "SELECT * FROM User_Data";
int result = DBCommand.ExecuteNonQuery();
DBConnection.Close();
return result;
}
public int login(string User,string Password)
{
DataSet DS = new DataSet();
DBConnection.Open();
DBCommand.CommandText = "SELECT * FROM User_Data WHERE User_Name ='" + User + "' AND Password ='" + Password + "'";
DBAdapter.SelectCommand = DBCommand;
DBAdapter.Fill(DS);
int result = int.Parse(DS.Tables[0].Rows.Count.ToString());
DBConnection.Close();
return result;
}