public int CheckPassword_Basic(string username, string password) { //Query the DB to check for username/password string query = "SELECT priv from userBasic where username = '******' and password='******';"; object p = dbMan.ExecuteScalar(query); if (p == null) { return(-1); } else { return((int)p); } }
//Login public object GetCustomer(string UserName, string Pass) // Get the id of the customer { string query = "select IDCustomer from Customer where username = '******' and pass = '******' "; if (dbMan.ExecuteScalar(query) != null) { return(dbMan.ExecuteScalar(query)); } else { return(0); } }