예제 #1
0
        public void fillcombo(ComboBox cb)
        {
            string          query = "select Username from signup";
            Businesslogic   BL    = new Businesslogic();
            OleDbDataReader rec   = BL.SelectQuery(query);

            while (rec.Read())
            {
                cb.Items.Add(rec[0].ToString());
            }
        }
예제 #2
0
        public bool Authenticated(User_db udb)
        {
            string          query = string.Format("select * from signup where Username='******' and Password='******' and Usertype='{2}'", udb.Username, udb.Password, udb.Usertype);
            Businesslogic   BL    = new Businesslogic();
            OleDbDataReader rec   = BL.SelectQuery(query);

            if (rec.Read())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }