public void Konekcija()
{
DataTable dt = new DataTable();
DataSet ds = new DataSet();
ds.Tables.Add(dt);
con.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from Korisnici", con);
da.Fill(dt);
string korisnik = comboBox1.Text.Trim();
string pass = textBox1.Text.Trim();
foreach (DataRow in dt.Rows)
{
if (((korisnik == DataRow.Equals[1]) && (pass == DataRow.Equals[2])))
{
con.Close();
return true;
}
}
con.Close();
return false;
}