本文整理汇总了C#中IDataRecord.GetBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# IDataRecord.GetBoolean方法的具体用法?C# IDataRecord.GetBoolean怎么用?C# IDataRecord.GetBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDataRecord
的用法示例。
在下文中一共展示了IDataRecord.GetBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadParleyFromDataReader
private static BasicParley ReadParleyFromDataReader (IDataRecord reader)
{
int parleyId = reader.GetInt32(0);
int organizationId = reader.GetInt32(1);
int personId = reader.GetInt32(2);
int budgetId = reader.GetInt32(3);
DateTime createdDateTime = reader.GetDateTime(4);
bool open = reader.GetBoolean(5);
bool attested = reader.GetBoolean(6);
string name = reader.GetString(7);
int geographyId = reader.GetInt32(8);
string description = reader.GetString(9);
string informationUrl = reader.GetString(10);
DateTime startDate = reader.GetDateTime(11);
DateTime endDate = reader.GetDateTime(12);
Int64 budgetCents = reader.GetInt64(13);
Int64 guaranteeCents = reader.GetInt64(14);
Int64 attendanceFeeCents = reader.GetInt64(15);
DateTime closedDateTime = reader.GetDateTime(16);
return new BasicParley(
parleyId, organizationId, personId, budgetId, createdDateTime,
open, attested, name, geographyId, description,
informationUrl, startDate, endDate, budgetCents, guaranteeCents,
attendanceFeeCents, closedDateTime);
}
示例2: ReadOutboundMailFromDataReader
private static BasicOutboundMail ReadOutboundMailFromDataReader (IDataRecord reader)
{
int outboundMailId = reader.GetInt32(0);
int authorType = reader.GetInt32(1);
int authorPersonId = reader.GetInt32(2);
string title = reader.GetString(3);
string body = reader.GetString(4);
int mailPriority = reader.GetInt32(5);
int mailTypeId = reader.GetInt32(6);
int organizationId = reader.GetInt32(7);
int geographyId = reader.GetInt32(8);
DateTime createdDateTime = reader.GetDateTime(9);
DateTime releaseDateTime = reader.GetDateTime(10);
bool readyForPickup = reader.GetBoolean(11);
bool resolved = reader.GetBoolean(12);
bool processed = reader.GetBoolean(13);
DateTime resolvedDateTime = reader.GetDateTime(14);
DateTime startProcessDateTime = reader.GetDateTime(15);
DateTime endProcessDateTime = reader.GetDateTime(16);
int recipientCount = reader.GetInt32(17);
int recipientsSuccess = reader.GetInt32(18);
int recipientsFail = reader.GetInt32(19);
return new BasicOutboundMail(outboundMailId, (MailAuthorType)authorType, authorPersonId, title, body,
mailPriority, mailTypeId, organizationId, geographyId, createdDateTime,
releaseDateTime, readyForPickup, resolved, processed, resolvedDateTime, startProcessDateTime, endProcessDateTime,
recipientCount, recipientsSuccess, recipientsFail);
}
示例3: ReadOutboundCommRecipientFromDataReader
private BasicOutboundCommRecipient ReadOutboundCommRecipientFromDataReader(IDataRecord reader) // Not static -- accesses cache, requiring connection strings
{
int outboundCommRecipientId = reader.GetInt32(0);
int outboundCommId = reader.GetInt32(1);
int personId = reader.GetInt32(2);
bool open = reader.GetBoolean(3);
bool success = reader.GetBoolean(4);
int failReasonId = reader.GetInt32(5);
string failReason = GetCachedFailReasonName(failReasonId);
return new BasicOutboundCommRecipient (outboundCommRecipientId, outboundCommId, personId, open, success, failReason);
}
示例4: ReadCommunicationTurnaroundFromDataReader
private static BasicCommunicationTurnaround ReadCommunicationTurnaroundFromDataReader(IDataRecord reader)
{
int organizationId = reader.GetInt32(0);
int communicationTypeId = reader.GetInt32(1);
int communicationId = reader.GetInt32(2);
DateTime dateTimeOpened = reader.GetDateTime(3);
DateTime dateTimeFirstResponse = reader.GetDateTime(4);
int personIdFirstResponse = reader.GetInt32(5);
DateTime dateTimeClosed = reader.GetDateTime(6);
int personIdClosed = reader.GetInt32(7);
bool open = reader.GetBoolean(8);
bool awaitingResponse = reader.GetBoolean(9);
return new BasicCommunicationTurnaround(organizationId, communicationTypeId, communicationId, dateTimeOpened, dateTimeFirstResponse, personIdFirstResponse, dateTimeClosed, personIdClosed, open, awaitingResponse);
}
示例5: ReadParleyAttendeeFromDataReader
private static BasicParleyAttendee ReadParleyAttendeeFromDataReader(IDataRecord reader)
{
int parleyAttendeeId = reader.GetInt32(0);
int parleyId = reader.GetInt32(1);
int personId = reader.GetInt32(2);
DateTime signupDateTime = reader.GetDateTime(3);
bool active = reader.GetBoolean(4);
DateTime cancelDateTime = reader.GetDateTime(5);
bool invoiced = reader.GetBoolean(6);
int outboundInvoiceId = reader.GetInt32(7);
bool isGuest = reader.GetBoolean(8);
return new BasicParleyAttendee (parleyAttendeeId, parleyId, personId, signupDateTime, active, cancelDateTime, invoiced, outboundInvoiceId, isGuest);
}
示例6: Answer
/// <exception cref="AggregateException">Condition.</exception>
public Answer(IDataRecord record)
{
IList<Exception> exceptions = null;
var sc = StringComparer.OrdinalIgnoreCase;
for (var i = 0; i < record.FieldCount; i++)
{
try
{
var name = record.GetName(i);
if (sc.Equals(name, "AnswerID") || sc.Equals(name, "ID"))
AnswerID = record.GetInt32(i);
else if (sc.Equals(name, "QuestionID"))
QuestionID = record.GetInt32(i);
else if (sc.Equals(name, "Text"))
Text = record.GetString(i);
else if (sc.Equals(name, "Correct"))
Correct = record.GetBoolean(i);
}
catch (Exception ex)
{
(exceptions ?? (exceptions = new List<Exception>(1))).Add(ex);
}
}
if (exceptions != null && exceptions.Count > 0)
throw new AggregateException("One or more errors occurred loading the " + typeof(Answer).FullName + " object from "
+ typeof(IDataRecord).FullName + ".", exceptions);
}
示例7: ReadMotionAmendmentFromDataReader
private static BasicMotionAmendment ReadMotionAmendmentFromDataReader(IDataRecord reader)
{
int motionAmendmentId = reader.GetInt32(0);
int motionId = reader.GetInt32(1);
int sequenceNumber = reader.GetInt32(2);
int submittedByPersonId = reader.GetInt32(3);
int createdByPersonId = reader.GetInt32(4);
DateTime createdDateTime = reader.GetDateTime(5);
string title = reader.GetString(6);
string text = reader.GetString(7);
string decisionPoint = reader.GetString(8);
bool open = reader.GetBoolean(9);
bool carried = reader.GetBoolean(10);
return new BasicMotionAmendment(motionAmendmentId, motionId, sequenceNumber, submittedByPersonId, createdByPersonId, createdDateTime, title, text, decisionPoint, open, carried);
}
示例8: ReadSalaryFromDataReader
private static BasicSalary ReadSalaryFromDataReader(IDataRecord reader)
{
int salaryId = reader.GetInt32(0);
int payrollItemId = reader.GetInt32(1);
DateTime payoutDate = reader.GetDateTime(2);
Int64 baseSalaryCents = reader.GetInt64(3);
Int64 netSalaryCents = reader.GetInt64(4);
Int64 subtractiveTaxCents = reader.GetInt64(5);
Int64 additiveTaxCents = reader.GetInt64(6);
bool attested = reader.GetBoolean(7);
bool netPaid = reader.GetBoolean(8);
bool taxPaid = reader.GetBoolean(9);
bool open = reader.GetBoolean(10);
return new BasicSalary(salaryId, payrollItemId, payoutDate, baseSalaryCents, netSalaryCents, subtractiveTaxCents, additiveTaxCents,
attested, netPaid, taxPaid, open);
}
示例9: ReadInternalPollVoterFromDataReader
private static BasicInternalPollVoter ReadInternalPollVoterFromDataReader(IDataRecord reader)
{
int personId = reader.GetInt32(0);
int internalPollId = reader.GetInt32(1);
bool open = reader.GetBoolean(2);
DateTime closedDateTime = reader.GetDateTime(3);
return new BasicInternalPollVoter(personId, internalPollId, open, closedDateTime);
}
示例10: GetBoolean
/// <summary>
/// Gets the Boolean value for the specified <paramref name="field"/>.
/// </summary>
/// <param name="reader">
/// The <see cref="IDataReader"/> reader.
/// </param>
/// <param name="field">
/// The field.
/// </param>
/// <returns>
/// The Boolean value.
/// </returns>
public static bool GetBoolean(IDataRecord reader, string field)
{
int ordinal = reader.GetOrdinal(field);
if (reader.IsDBNull(ordinal))
{
return false;
}
return reader.GetBoolean(ordinal);
}
示例11: ReadParleyOptionFromDataReader
private static BasicParleyOption ReadParleyOptionFromDataReader(IDataRecord reader)
{
int parleyId = reader.GetInt32(0);
int parleyOptionId = reader.GetInt32(1);
string description = reader.GetString(2);
Int64 amountCents = reader.GetInt64(3);
bool active = reader.GetBoolean(4);
return new BasicParleyOption(parleyOptionId, parleyId, description, amountCents, active);
}
示例12: User
public User(IDataRecord data)
{
Id = data.GetInt64(0);
Username = data.GetString(1);
ActivatedFlag = data.GetBoolean(2);
Password = new byte[64];
data.GetBytes(3, 0, Password, 0, 64);
Salt = data.GetInt32(4);
}
示例13: ReadFinancialTransactionTagTypeFromDataReader
private static BasicFinancialTransactionTagType ReadFinancialTransactionTagTypeFromDataReader(IDataRecord reader)
{
int financialTransactionTagTypeId = reader.GetInt32 (0);
int parentFinancialTransactionTagTypeId = reader.GetInt32 (1);
int financialTransactionTagSetId = reader.GetInt32 (2);
string name = reader.GetString (3);
bool active = reader.GetBoolean (4);
int openedYear = reader.GetInt32 (5);
int closedYear = reader.GetInt32 (6);
return new BasicFinancialTransactionTagType(financialTransactionTagTypeId, parentFinancialTransactionTagTypeId, financialTransactionTagSetId, name, active, openedYear, closedYear);
}
示例14: ReadFinancialTransactionTagSetFromDataReader
private static BasicFinancialTransactionTagSet ReadFinancialTransactionTagSetFromDataReader(IDataRecord reader)
{
int financialTransactionTagSetId = reader.GetInt32(0);
int financialTransactionTagSetTypeId = reader.GetInt32 (1);
int organizationId = reader.GetInt32 (2);
int order = reader.GetInt32 (3);
bool allowUntagged = reader.GetBoolean (4);
int visibilityLevel = reader.GetInt32(5);
int profitLossType = reader.GetInt32(6);
return new BasicFinancialTransactionTagSet(financialTransactionTagSetId, financialTransactionTagSetTypeId, organizationId, order, allowUntagged, visibilityLevel, profitLossType);
}
示例15: ReadRefundFromDataReader
private static BasicRefund ReadRefundFromDataReader(IDataRecord reader)
{
int refundId = reader.GetInt32(0);
int paymentId = reader.GetInt32(1);
bool open = reader.GetBoolean(2);
Int64 amountCents = reader.GetInt64(3);
DateTime createdDateTime = reader.GetDateTime(4);
DateTime closedDateTime = reader.GetDateTime(5);
int createdByPersonId = reader.GetInt32(6);
return new BasicRefund(refundId, paymentId, open, amountCents, createdByPersonId, createdDateTime, closedDateTime);
}