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


C# IDataReader.ReadDateTime方法代码示例

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


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

示例1: UserStatus

        public UserStatus(IDataReader reader)
            : this()
        {
            StatusId = reader.GetInt64(0);
            StatusKey = reader.GetString(1);
            ParentKey = reader.GetString(2);

            ProfileId = reader.GetInt64(3);

            SourceChannelId = reader.GetInt64(4);
            TargetChannelId = reader.GetString(5);

            ChannelStatusKey = reader.GetString(6);

            From = new SourceAddress(reader.GetString(7));
            To = new SourceAddress(reader.GetString(8));

            Status = reader.GetString(9);

            InReplyTo = reader.GetString(10);
            StatusType = reader.GetInt32(11);

            SearchKeyword = reader.GetString(12);
            IsRead = reader.ReadBoolean(13);

            SortDate = reader.ReadDateTime(14);
            DateRead = reader.ReadDateTimeOrNull(15);
            DateCreated = reader.ReadDateTime(16);
        }
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:29,代码来源:UserStatus.cs

示例2: UserStatusAttachment

 public UserStatusAttachment(IDataReader reader)
     : this()
 {
     AttachmentId = reader.GetInt64(0);
     UserId = reader.GetInt64(1);
     StatusKey = reader.GetString(2);
     PreviewImageUrl = reader.GetString(3);
     PreviewAltText = reader.GetString(4);
     TargetUrl = reader.GetString(5);
     MediaType = reader.GetInt16(6);
     DateCreated = reader.ReadDateTime(7);
 }
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:12,代码来源:UserStatusAttachment.cs

示例3: Person

        public Person(IDataReader reader)
            : this()
        {
            PersonId = reader.GetInt64(0);

            if (!reader.IsDBNull(1))
                PersonKey = reader.GetString(1);

            if (!reader.IsDBNull(2))
                RedirectPersonId = reader.ReadInt64OrNull(2);

            if (!reader.IsDBNull(3))
                SourceChannelId = reader.GetInt64(3);

            if (!reader.IsDBNull(4))
                Firstname = reader.GetString(4);

            if (!reader.IsDBNull(5))
                Lastname = reader.GetString(5);

            if (!reader.IsDBNull(6))
                DateOfBirth = reader.ReadDateTimeOrNull(6);

            if (!reader.IsDBNull(7))
                Locale = reader.GetString(7);

            if (!reader.IsDBNull(8))
                Gender = reader.GetString(8);

            if (!reader.IsDBNull(9))
                Timezone = reader.GetString(9);

            if (!reader.IsDBNull(10))
                DateCreated = reader.ReadDateTime(10);
        }
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:35,代码来源:Person.cs

示例4: Profile

        public Profile(IDataReader reader)
            : this()
        {
            ProfileId = reader.GetInt64(0);

            if (!reader.IsDBNull(1))
                ProfileKey = reader.GetString(1);

            if (!reader.IsDBNull(2))
                PersonId = reader.GetInt64(2);

            if (!reader.IsDBNull(3))
                IsSoft = reader.ReadBoolean(3);

            if (!reader.IsDBNull(4))
                ChannelProfileKey = reader.GetString(4);

            if (!reader.IsDBNull(5))
                SourceChannelId = reader.GetInt64(5);

            try
            {
                if (!reader.IsDBNull(6))
                    ProfileType = (ProfileType)Enum.Parse(typeof(ProfileType), reader.GetString(6));
            }
            catch (Exception)
            {
                // Due to an update in the ProfileType enumeration, revert back to default in case of an exception
                ProfileType = ProfileType.Default;
            }

            if (!reader.IsDBNull(7))
                AvatarStreamName = reader.GetString(7);

            if (!reader.IsDBNull(8))
                ScreenName = reader.GetString(8);

            if (!reader.IsDBNull(9))
                Address = reader.GetString(9);

            if (!reader.IsDBNull(10))
                Url = reader.GetString(10);

            if (!reader.IsDBNull(11))
                SourceAddress = new SourceAddress(reader.GetString(11));

            if (!reader.IsDBNull(12))
                Location = reader.GetString(12);

            if (!reader.IsDBNull(13))
                GeoLocation = reader.GetString(13);

            if (!reader.IsDBNull(14))
                CompanyName = reader.GetString(14);

            if (!reader.IsDBNull(15))
                Title = reader.GetString(15);

            if (!reader.IsDBNull(16))
                Street = reader.GetString(16);

            if (!reader.IsDBNull(17))
                HouseNumber = reader.GetString(17);

            if (!reader.IsDBNull(18))
                ZipCode = reader.GetString(18);

            if (!reader.IsDBNull(19))
                City = reader.GetString(19);

            if (!reader.IsDBNull(20))
                State = reader.GetString(20);

            if (!reader.IsDBNull(21))
                Country = reader.GetString(21);

            if (!reader.IsDBNull(22))
                CountryCode = reader.GetString(22);

            if (!reader.IsDBNull(23))
                PhoneNr = reader.GetString(23);

            if (!reader.IsDBNull(24))
                MobileNr = reader.GetString(24);

            if (!reader.IsDBNull(25))
                FaxNr = reader.GetString(25);

            if (!reader.IsDBNull(26))
                DateCreated = reader.ReadDateTime(26);
        }
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:91,代码来源:Profile.cs


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