示例#1
0
        public DataTable GetAllTours()
        {
            DataSet ds = new DataSet();

            Bd_Interface.ReturnAdapter($"SELECT * FROM Tours").Fill(ds, "Tours");

            return(ds.Tables["Tours"]);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }