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


C# IDataRecord.GetInt32方法代码示例

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


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

示例1: FillDataRecord

 private static GroupBE FillDataRecord(IDataRecord dr)
 {
     GroupBE objGroupBE = new GroupBE();
     if (!dr.IsDBNull(dr.GetOrdinal("GroupId")))
     {
         objGroupBE.GroupId = dr.GetInt32(dr.GetOrdinal("GroupId"));
     }
     if (!dr.IsDBNull(dr.GetOrdinal("GroupName")))
     {
         objGroupBE.GroupName = dr.GetString(dr.GetOrdinal("GroupName"));
     }
     if (!dr.IsDBNull(dr.GetOrdinal("OwnerId")))
     {
         objGroupBE.OwnerId = dr.GetInt32(dr.GetOrdinal("OwnerId"));
     }
     if (!dr.IsDBNull(dr.GetOrdinal("StartDate")))
     {
         objGroupBE.StartDate = dr.GetDateTime(dr.GetOrdinal("StartDate"));
     }
     if (!dr.IsDBNull(dr.GetOrdinal("EndDate")))
     {
         objGroupBE.EndDate = dr.GetDateTime(dr.GetOrdinal("EndDate"));
     }
     return objGroupBE;
 }
开发者ID:jitendrac,项目名称:socialconnect,代码行数:25,代码来源:GroupDA.cs

示例2: FillDataRecord

        private static GroupXFilesBE FillDataRecord(IDataRecord dr)
        {
            GroupXFilesBE  objGroupXFilesBE = new GroupXFilesBE();
            if (!dr.IsDBNull(dr.GetOrdinal("GroupXFileId")))
            {
                objGroupXFilesBE.GroupXFileId = dr.GetInt32(dr.GetOrdinal("GroupXFileId"));
            }

            if (!dr.IsDBNull(dr.GetOrdinal("GroupId")))
            {
                objGroupXFilesBE.GroupId = dr.GetInt32(dr.GetOrdinal("GroupId"));
            }

            if (!dr.IsDBNull(dr.GetOrdinal("FileId")))
            {
                objGroupXFilesBE.FileId = dr.GetInt32(dr.GetOrdinal("FileId"));
            }

            if (!dr.IsDBNull(dr.GetOrdinal("Category")))
            {
                objGroupXFilesBE.Category = dr.GetString(dr.GetOrdinal("Category"));
            }

            return objGroupXFilesBE;
        }
开发者ID:jitendrac,项目名称:socialconnect,代码行数:25,代码来源:GroupXFilesDA.cs

示例3: 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

示例4: PopulateFromReader

		private static Profile PopulateFromReader(IDataRecord reader)
		{
			return new Profile(reader.GetInt32(0)) {
				IsSubscribed = reader.GetBoolean(1),
				Signature = reader.GetString(2),
				ShowDetails = reader.GetBoolean(3),
				Location = reader.GetString(4),
				IsPlainText = reader.GetBoolean(5),
				Dob = reader.NullDateTimeDbHelper(6),
				Web = reader.GetString(7),
				Aim = reader.GetString(8),
				Icq = reader.GetString(9),
				YahooMessenger = reader.GetString(10),
				Facebook = reader.NullStringDbHelper(11),
				Twitter = reader.NullStringDbHelper(12),
				IsTos = reader.GetBoolean(13),
				TimeZone = reader.GetInt32(14),
				IsDaylightSaving = reader.GetBoolean(15),
				AvatarID = reader.NullIntDbHelper(16),
				ImageID = reader.NullIntDbHelper(17),
				HideVanity = reader.GetBoolean(18),
				LastPostID = reader.NullIntDbHelper(19),
				Points = reader.GetInt32(20)
			};
		}
开发者ID:andyliyuze,项目名称:POPForums,代码行数:25,代码来源:ProfileRepository.cs

示例5: 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

示例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: ReadPayoutDependencyFromDataReader

        private static BasicFinancialDependency ReadPayoutDependencyFromDataReader(IDataRecord reader)
        {
            int payoutId = reader.GetInt32(0);
            string financialDependencyTypeString = reader.GetString(1);
            int foreignId = reader.GetInt32(2);

            return new BasicFinancialDependency(payoutId, (FinancialDependencyType) Enum.Parse(typeof (FinancialDependencyType), financialDependencyTypeString), foreignId);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:8,代码来源:Database-Payouts.cs

示例8: SearchResult

 public SearchResult(IDataRecord data)
 {
     PrimaryId = data.GetInt32(0);
     SecondaryId = data.GetInt32(1);
     ClassName = data.GetString(2);
     PrimaryText = data.GetString(3);
     SecondaryText = data.GetString(4);
 }
开发者ID:ha1ogen,项目名称:atlassed,代码行数:8,代码来源:SearchResult.cs

示例9: ReadInternalPollVoteFromDataReader

        private static BasicInternalPollVote ReadInternalPollVoteFromDataReader(IDataRecord reader)
        {
            int internalPollVoteId = reader.GetInt32(0);
            int internalPollId = reader.GetInt32(1);
            string verificationCode = reader.GetString(2);

            return new BasicInternalPollVote(internalPollVoteId, internalPollId, verificationCode);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:8,代码来源:Database-InternalPollVotes.cs

示例10: FillDataRecord

        private static Company FillDataRecord(IDataRecord myDataRecord)
        {
            Company company = new Company();
            company.Id = myDataRecord.GetInt32(myDataRecord.GetOrdinal("id"));
            company.Name = myDataRecord.GetString(myDataRecord.GetOrdinal("name"));
            company.Type = (ServiceProviderType)myDataRecord.GetInt32(myDataRecord.GetOrdinal("ctype"));

            return company;
        }
开发者ID:sunnyrajrathod,项目名称:OnePointTelecom,代码行数:9,代码来源:CompanyDB.cs

示例11: ReadInternalPollCandidateFromDataReader

        private static BasicInternalPollCandidate ReadInternalPollCandidateFromDataReader(IDataRecord reader)
        {
            int internalPollCandidateId = reader.GetInt32(0);
            int internalPollId = reader.GetInt32(1);
            int personId = reader.GetInt32(2);
            string candidacyStatement = reader.GetString(3);

            return new BasicInternalPollCandidate(internalPollCandidateId, internalPollId, personId, candidacyStatement);
        }
开发者ID:SwarmCorp,项目名称:Swarmops,代码行数:9,代码来源:Database-InternalPollCandidates.cs

示例12: FillDataRecord

 private static Loan FillDataRecord(IDataRecord myDataRecord)
 {
     Loan loan = new Loan();
     loan.Id = myDataRecord.GetInt32(myDataRecord.GetOrdinal("Id"));
     loan.ApplicantId = myDataRecord.GetInt32(myDataRecord.GetOrdinal("ApplicantID"));
     loan.Amount = myDataRecord.GetDecimal(myDataRecord.GetOrdinal("Amount"));
     loan.Type = (LoanType)myDataRecord.GetInt32(myDataRecord.GetOrdinal("Type"));
     return loan;
 }
开发者ID:walbalooshi,项目名称:LoanApplication,代码行数:9,代码来源:LoanDB.cs

示例13: 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

示例14: FillDataRecord

        private static TelecomPoints FillDataRecord(IDataRecord myDataRecord)
        {
            TelecomPoints telecomPoints = new TelecomPoints();
            telecomPoints.Id = myDataRecord.GetInt32(myDataRecord.GetOrdinal("Id"));
            telecomPoints.MinPoints = myDataRecord.GetInt32(myDataRecord.GetOrdinal("minpoints"));
            telecomPoints.MaxPoints = myDataRecord.GetInt32(myDataRecord.GetOrdinal("maxpoints"));
            telecomPoints.DiscountPercent = myDataRecord.GetInt32(myDataRecord.GetOrdinal("discount"));

            return telecomPoints;
        }
开发者ID:sunnyrajrathod,项目名称:OnePointTelecom,代码行数:10,代码来源:TelecomPointsDB.cs

示例15: 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


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