当前位置: 首页>>代码示例>>C#>>正文


C# OdbcDataReader.GetBoolean方法代码示例

本文整理汇总了C#中System.Data.Odbc.OdbcDataReader.GetBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# OdbcDataReader.GetBoolean方法的具体用法?C# OdbcDataReader.GetBoolean怎么用?C# OdbcDataReader.GetBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Data.Odbc.OdbcDataReader的用法示例。


在下文中一共展示了OdbcDataReader.GetBoolean方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: readAchievement

 /// <summary>
 /// Constructs an achievement from the output of a datareader. Assumes that there
 /// is data ready to be read from the current record 14/12/15
 /// </summary>
 private static Achievement readAchievement(OdbcDataReader dataReader)
 {
     return new Achievement(dataReader.GetInt16(0), dataReader.GetString(1),
     dataReader.GetString(2), dataReader.GetString(3), dataReader.GetString(4),
     dataReader.GetInt16(5), dataReader.GetDateTime(6), dataReader.GetBoolean(7));
 }
开发者ID:LordJameh,项目名称:Computing-Project,代码行数:10,代码来源:Database.cs

示例2: readUser

 /// <summary>
 /// Constructs a user from the output of a datareader. Assumes that there is data
 /// ready to be read from the current record 14/12/15
 /// </summary>
 private static User readUser(OdbcDataReader dataReader)
 {
     return new User(dataReader.GetInt16(0), dataReader.GetString(1),
     dataReader.GetString(3), dataReader.GetString(4), dataReader.GetString(5),
     dataReader.GetBoolean(6), dataReader.GetDateTime(7), dataReader.GetInt16(8),
     dataReader.GetInt16(9), dataReader.GetBoolean(10), dataReader.GetBoolean(11),
     dataReader.GetInt16(13));
 }
开发者ID:LordJameh,项目名称:Computing-Project,代码行数:12,代码来源:Database.cs

示例3: GetUserFromReader

        //
        // GetUserFromReader
        //    A helper function that takes the current row from the OdbcDataReader
        // and hydrates a MembershiUser from the values. Called by the
        // MembershipUser.GetUser implementation.
        //
        private MembershipUser GetUserFromReader(OdbcDataReader reader)
        {
            object providerUserKey = reader.GetValue(0);
            string username = reader.GetString(1);
            string email = reader.GetString(2);

            string passwordQuestion = "";
            if (reader.GetValue(3) != DBNull.Value)
                passwordQuestion = reader.GetString(3);

            string comment = "";
            if (reader.GetValue(4) != DBNull.Value)
                comment = reader.GetString(4);

            bool isApproved = reader.GetBoolean(5);
            bool isLockedOut = reader.GetBoolean(6);
            DateTime creationDate = reader.GetDateTime(7);

            DateTime lastLoginDate = new DateTime();
            if (reader.GetValue(8) != DBNull.Value)
                lastLoginDate = reader.GetDateTime(8);

            DateTime lastActivityDate = reader.GetDateTime(9);
            DateTime lastPasswordChangedDate = reader.GetDateTime(10);

            DateTime lastLockedOutDate = new DateTime();
            if (reader.GetValue(11) != DBNull.Value)
                lastLockedOutDate = reader.GetDateTime(11);

            MembershipUser u = new MembershipUser((this.Name == null) ? "SimpleMysqlMembershipProvider" : this.Name,
                                                  username,
                                                  providerUserKey,
                                                  email,
                                                  passwordQuestion,
                                                  comment,
                                                  isApproved,
                                                  isLockedOut,
                                                  creationDate,
                                                  lastLoginDate,
                                                  lastActivityDate,
                                                  lastPasswordChangedDate,
                                                  lastLockedOutDate);

            return u;
        }
开发者ID:windrobin,项目名称:3D-Repository,代码行数:51,代码来源:MysqlMembershipProvider.cs

示例4: GetUserFromReader

        private OpenIdMembershipUser GetUserFromReader(OdbcDataReader reader)
        {
            string username = reader.GetString(0);

            string openId = reader.IsDBNull(1) ? string.Empty : reader.GetString(1);
            string email = reader.IsDBNull(2) ? string.Empty : reader.GetString(2);
            string passwordQuestion = "";
            if (reader.GetValue(3) != DBNull.Value)
                passwordQuestion = reader.GetString(3);

            string comment = "";
            if (reader.GetValue(4) != DBNull.Value)
                comment = reader.GetString(4);

            bool isApproved = reader.GetBoolean(5);

            DateTime creationDate = reader.GetDateTime(6);

            DateTime lastLoginDate = new DateTime();
            if (reader.GetValue(7) != DBNull.Value)
                lastLoginDate = reader.GetDateTime(7);

            DateTime lastActivityDate = reader.GetDateTime(8);

            DateTime lastPasswordChangedDate = reader.GetDateTime(9);

            object providerUserKey = reader.GetValue(10);

            bool isLockedOut = reader.GetBoolean(11);

            DateTime lastLockedOutDate = new DateTime();
            if (reader.GetValue(12) != DBNull.Value)
                lastLockedOutDate = reader.GetDateTime(12);

            OpenIdMembershipUser u = new OpenIdMembershipUser(
                                                  this.Name,
                                                  openId,
                                                  username,
                                                  providerUserKey,
                                                  email,
                                                  passwordQuestion,
                                                  comment,
                                                  isApproved,
                                                  isLockedOut,
                                                  creationDate,
                                                  lastLoginDate,
                                                  lastActivityDate,
                                                  lastPasswordChangedDate,
                                                  lastLockedOutDate);

            return u;
        }
开发者ID:adlnet,项目名称:3D-Repository,代码行数:52,代码来源:OpenIdMembershipProvider.cs

示例5: GetProfileInfoFromReader

        //
        // GetProfileInfoFromReader
        //  Takes the current row from the OdbcDataReader
        // and populates a ProfileInfo object from the values.
        //
        private ProfileInfo GetProfileInfoFromReader(OdbcDataReader reader)
        {
            string username = reader.GetString(0);

            DateTime lastActivityDate = new DateTime();
            if (reader.GetValue(1) != DBNull.Value)
                lastActivityDate = reader.GetDateTime(1);

            DateTime lastUpdatedDate = new DateTime();
            if (reader.GetValue(2) != DBNull.Value)
                lastUpdatedDate = reader.GetDateTime(2);

            bool isAnonymous = reader.GetBoolean(3);

            // ProfileInfo.Size not currently implemented.
            ProfileInfo p = new ProfileInfo(username,
                isAnonymous, lastActivityDate, lastUpdatedDate, 0);

            return p;
        }
开发者ID:grrizzly,项目名称:3D-Repository,代码行数:25,代码来源:MysqlProfileProvider.cs


注:本文中的System.Data.Odbc.OdbcDataReader.GetBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。