本文整理汇总了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));
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}