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


C# IDataRecord.GetBoolean方法代码示例

本文整理汇总了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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:29,代码来源:Database-Parleys.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:31,代码来源:Database-OutboundMails.cs

示例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);


        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:15,代码来源:Database-OutboundCommRecipients.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:15,代码来源:Database-CommunicationTurnarounds.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:15,代码来源:Database-ParleyAttendees.cs

示例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);
        }
开发者ID:zeldafreak,项目名称:Area51,代码行数:29,代码来源:Answer.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:16,代码来源:Database-MotionAmendments.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:17,代码来源:Database-Salaries.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:9,代码来源:Database-InternalPollVotes.cs

示例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);
        }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:22,代码来源:DatabaseHelper.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:10,代码来源:Database-ParleyOptions.cs

示例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);
        }
开发者ID:FuujinTheHacker,项目名称:LoM,代码行数:11,代码来源:User.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:12,代码来源:Database-FinancialTransactionTagTypes.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:12,代码来源:Database-FinancialTransactionTagSets.cs

示例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);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:12,代码来源:Database-Refunds.cs


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