Exemplo n.º 1
0
        public void fillcombobox(ComboBox CB)
        {
            //   ComboBox CB = new ComboBox();
            string          query = "Select username from credential where usertype = 'user'";
            Business_Logic  BL    = new Business_Logic();
            OleDbDataReader rec   = BL.SelectQuery(query);

            while (rec.Read())
            {
                CB.Items.Add(rec[0].ToString());
            }
            //   return CB;
        }
Exemplo n.º 2
0
        public bool Authenticate(Credential_DB cDB)
        {
            string          query = String.Format("select * from Credential where username = '******' and password = '******' and usertype ='{2}'", cDB.UserName, cDB.Password, cDB.UserType);
            Business_Logic  BL    = new Business_Logic();
            OleDbDataReader rec   = BL.SelectQuery(query);

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