/// <summary> > /// Returns a boolean indicating whether or not the user is an Admin User > /// </summary> > public bool CheckAdminUser(int UserPK) > { > // Get a reference to the data access object > mmDataAccessBase dao = this.GetDataAccessObject(); > > // Create the parameter and set the direction > IDbDataParameter param1 = dao.CreateParameter("@UserPK", UserPK); > param1.Direction = ParameterDirection.Input; > > // Call the stored procedure and pass the parameter > IDbCommand cmd; > object retval = this.ExecSprocScalar("ssAPI_CheckAdminUser",out cmd, param1); > > if (retval != null) > { > > if (retval.ToString() == "Administrator") > { > // admin user > return true; > } > else > { > // not an admin user > return false; > } > } > else > > // not an admin user > return false; > > }>