public DataTable GetAllTours() { DataSet ds = new DataSet(); Bd_Interface.ReturnAdapter($"SELECT * FROM Tours").Fill(ds, "Tours"); return(ds.Tables["Tours"]); }
bool IsWrongLog() { string query = $"Select * from Accounts Where Login = '******'"; DataTable DTable = new DataTable(); Bd_Interface.ReturnAdapter(query).Fill(DTable); if (DTable.Rows.Count == 0) { return(false); } return(true); }
private int CheckLogPass(ref bool IsAdmin) { string Pass = Program.GetHash(PassTB.Text); string query = $"Select * from Accounts Where Login = '******' and Pass = '******'"; DataTable DTable = new DataTable(); Bd_Interface.ReturnAdapter(query).Fill(DTable); if (DTable.Rows.Count == 1) { IsAdmin = (bool)DTable.Rows[0].ItemArray[3]; return((int)DTable.Rows[0].ItemArray[0]); } return(0); }