Пример #1
0
        public override IList <OpenIdSettingsInfo> GetConfigedItems()
        {
            IList <OpenIdSettingsInfo> list = new List <OpenIdSettingsInfo>();
            DbCommand sqlStringCommand      = this.database.GetSqlStringCommand("SELECT * FROM aspnet_OpenIdSettings");

            using (IDataReader reader = this.database.ExecuteReader(sqlStringCommand))
            {
                while (reader.Read())
                {
                    OpenIdSettingsInfo item = MemberProvider.PopulateOpenIdSettings(reader);
                    list.Add(item);
                }
            }
            return(list);
        }
Пример #2
0
        public override OpenIdSettingsInfo GetOpenIdSettings(string openIdType)
        {
            OpenIdSettingsInfo info             = null;
            DbCommand          sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM aspnet_OpenIdSettings WHERE LOWER(OpenIdType)=LOWER(@OpenIdType)");

            this.database.AddInParameter(sqlStringCommand, "OpenIdType", DbType.String, openIdType.ToLower());
            using (IDataReader reader = this.database.ExecuteReader(sqlStringCommand))
            {
                if (reader.Read())
                {
                    info = MemberProvider.PopulateOpenIdSettings(reader);
                }
            }
            return(info);
        }
Пример #3
0
        public override OpenIdSettingsInfo GetOpenIdSettings(string openIdType)
        {
            OpenIdSettingsInfo result = null;

            System.Data.Common.DbCommand sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM aspnet_OpenIdSettings WHERE LOWER(OpenIdType)=LOWER(@OpenIdType)");
            this.database.AddInParameter(sqlStringCommand, "OpenIdType", System.Data.DbType.String, openIdType.ToLower());
            using (System.Data.IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand))
            {
                if (dataReader.Read())
                {
                    result = MemberProvider.PopulateOpenIdSettings(dataReader);
                }
            }
            return(result);
        }
Пример #4
0
        public override IList <OpenIdSettingsInfo> GetConfigedItems()
        {
            IList <OpenIdSettingsInfo> list = new List <OpenIdSettingsInfo>();

            System.Data.Common.DbCommand sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM distro_OpenIdSettings WHERE UserId=@UserId");
            this.database.AddInParameter(sqlStringCommand, "UserId", System.Data.DbType.Int32, HiContext.Current.SiteSettings.UserId.Value);
            using (System.Data.IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand))
            {
                while (dataReader.Read())
                {
                    OpenIdSettingsInfo item = MemberProvider.PopulateOpenIdSettings(dataReader);
                    list.Add(item);
                }
            }
            return(list);
        }
Пример #5
0
        public override OpenIdSettingsInfo GetOpenIdSettings(string openIdType)
        {
            OpenIdSettingsInfo result = null;

            System.Data.Common.DbCommand sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM distro_OpenIdSettings WHERE UserId=@UserId AND LOWER(OpenIdType)=LOWER(@OpenIdType)");
            this.database.AddInParameter(sqlStringCommand, "OpenIdType", System.Data.DbType.String, openIdType.ToLower());
            this.database.AddInParameter(sqlStringCommand, "UserId", System.Data.DbType.Int32, HiContext.Current.SiteSettings.UserId.Value);
            using (System.Data.IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand))
            {
                if (dataReader.Read())
                {
                    result = MemberProvider.PopulateOpenIdSettings(dataReader);
                }
            }
            return(result);
        }