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


C# SqlDataReader.BooleanField方法代码示例

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


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

示例1: MapPersonMessage

 /// <summary>
 /// Maps the person message.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>filled person message.</returns>
 private static PersonMessage MapPersonMessage(SqlDataReader dataReader)
 {
     return new PersonMessage
     {
         AlertId = dataReader.Int32Field(AlertId).ToString(CultureInfo.CurrentCulture),
         StatusId = dataReader.ByteField(StatusID).ToString(CultureInfo.CurrentCulture),
         AddedBy = dataReader.StringField(AddedBy),
         IsSoundEnable = dataReader.BooleanField(IsSoundEnable),
         AddedDateTime = dataReader.DateTimeNullableField(AddedDateTime)
     };
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:16,代码来源:AlertsAndMessageMapper.cs

示例2: MapAlert

 /// <summary>
 /// Maps the alerts.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>Alert object.</returns>
 private static Alert MapAlert(SqlDataReader dataReader)
 {
     return new Alert
     {
         AlertId = dataReader.Int32Field(AlertId).ToString(CultureInfo.CurrentCulture),
         AlertType = dataReader.StringField(AlertType),
         IsDenyAshore = dataReader.BooleanField(IsDenyAshore),
         IsDenyOnboard = dataReader.BooleanField(IsDenyOnboard),
         IsOverride = dataReader.BooleanField(IsOverride),
         IsSoundEnable = dataReader.BooleanField(IsSoundEnable),
         AddedDateTime = dataReader.DateTimeField(AddedDate)
     };
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:18,代码来源:AlertsAndMessageMapper.cs

示例3: RetrieveGuestReservationDetail

        /// <summary>
        /// Maps the guest reservation detail.
        /// </summary>
        /// <param name="dataReader">The data reader.</param>
        /// <returns>Guest collection</returns>
        private static async Task<GuestCollection> RetrieveGuestReservationDetail(SqlDataReader dataReader)
        {
            var guestCollection = new GuestCollection();
            if (dataReader != null)
            {
                while (await dataReader.ReadAsync())
                {
                    var guest = new Guest();

                    guest.GuestId = dataReader.Int32Field(GuestId).ToString();
                    guest.CruiseDetail = new GuestCruiseDetail();
                    guest.CruiseDetail.ReservationId = dataReader.Int32Field(ReservationId).ToString();
                    guest.CruiseDetail.ReservationNumber = dataReader.StringField(ReservationNumber);
                    guest.CruiseDetail.IsVip = dataReader.BooleanField(VIPFlag);
                    guest.CruiseDetail.IsPrimary = dataReader.BooleanField(IsPrimary);
                    guest.CruiseDetail.Stateroom = dataReader.StringField(Stateroom);
                    guest.CruiseDetail.EmbarkDate = dataReader.DateTimeField(EmbarkDate);
                    guest.CruiseDetail.DebarkDate = dataReader.DateTimeField(DebarkDate);
                    guest.CruiseDetail.ReservationStatusId = dataReader.ByteField(ReservationStatusId).ToString();
                    guest.CruiseDetail.VoyageId = dataReader.Int32Field(VoyageId).ToString();
                    var loyaltyLevelTypeId = dataReader.Int32NullableField(LoyaltyLevelTypeId);
                    guest.CruiseDetail.LoyaltyLevelTypeId = loyaltyLevelTypeId.HasValue ? loyaltyLevelTypeId.Value.ToString() : null;
                    var beaconId = dataReader.Int32NullableField(BeaconId);
                    guest.CruiseDetail.BeaconId = beaconId.HasValue ? beaconId.Value.ToString() : null;
                    ////guest.CruiseDetail.HasRecovery = dataReader.BooleanField(HasRecovery);
                    guest.CruiseDetail.HasTravelWith = dataReader.BooleanField(HasTravelWith);
                    guest.CruiseDetail.IsFolioAtRisk = dataReader.BooleanField(IsFolioAtRisk);
                    guest.CruiseDetail.CanDebarkAlone = dataReader.BooleanField(CanDebarkAlone);
                    guest.CruiseDetail.StateroomOccupancy = dataReader.ByteField(StateroomOccupancy).ToString();
                    guest.CruiseDetail.DiningDetail = dataReader.StringField(DiningDetail);
                    guest.CruiseDetail.IsCheckedIn = dataReader.BooleanField(IsCheckedIn);
                    guest.CruiseDetail.IsConciergeStatus = dataReader.BooleanField(IsConciergeStatus);
                    guest.CruiseDetail.IsBackToBack = dataReader.BooleanField(IsBackToBack);

                    var stateroomCategoryTypeId = dataReader.Int16NullableField(StateroomCategoryTypeID);
                    guest.CruiseDetail.StateroomCategoryTypeId = stateroomCategoryTypeId.HasValue ? stateroomCategoryTypeId.Value.ToString() : null;
                    guest.CruiseDetail.StateroomCategoryType = dataReader.StringField(Category);

                    guestCollection.Add(guest);
                }
            }

            return guestCollection;
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:49,代码来源:PersonDataMapper.cs

示例4: MapFolio

 /// <summary>
 /// Maps the folio.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>returns folio.</returns>
 private static Folio MapFolio(SqlDataReader dataReader)
 {
     return new Folio
     {
         FolioNumber = dataReader.StringField(FolioNumber),
         AccessCardNumber = dataReader.StringField(AccessCardNumber),
         FolioStatus = dataReader.StringField(FolioStatus),
         IsGangwayAllowed = dataReader.BooleanField(GangwayAllowedFlag)
     };
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:15,代码来源:PersonDataMapper.cs

示例5: MapVoyageItinerary

 /// <summary>
 /// Maps the voyage itinerary.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 /// <returns>Voyage Itinerary</returns>
 private static Itinerary MapVoyageItinerary(SqlDataReader dataReader)
 {
     return new Itinerary
     {
         VoyageItineraryId = dataReader.Int32Field(VoyageItineraryId).ToString(CultureInfo.CurrentCulture),
         PortId = dataReader.Int32Field(PortId).ToString(CultureInfo.CurrentCulture),
         ArrivalTime = dataReader.DateTimeNullableField(ArrivalTime),
         GangwayClosingTime = dataReader.DateTimeNullableField(GangwayClosingTime),
         GangwayOpeningTime = dataReader.DateTimeNullableField(GangwayOpeningTime),
         DepartureTime = dataReader.DateTimeNullableField(DepartureTime),
         Day = dataReader.ByteField(Day),
         IsSeaDay = dataReader.BooleanField(IsSeaDay)
     };
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:19,代码来源:ReferenceDataMapper.cs

示例6: MapVoyages

        /// <summary>
        /// Maps the voyages.
        /// </summary>
        /// <param name="dataReader">The data reader.</param>
        /// <returns>The Collection of voyages</returns>
        private static async Task<ICollection<Voyage>> MapVoyages(SqlDataReader dataReader)
        {
            var voyages = new Collection<Voyage>();
            IDictionary<string, ICollection<Itinerary>> itineraries = new Dictionary<string, ICollection<Itinerary>>();
            if (dataReader != null)
            {
                while (await dataReader.ReadAsync())
                {
                    var voyage = new Voyage
                    {
                        VoyageId = dataReader.Int32Field(VoyageId).ToString(),
                        ShipId = dataReader.ByteField(ShipId).ToString(),
                        Number = dataReader.StringField(Number),
                        Name = dataReader.StringField(Name),
                        EmbarkDate = dataReader.DateTimeField(EmbarkDate),
                        DebarkDate = dataReader.DateTimeField(DebarkDate),
                        EmbarkPortId = dataReader.Int32Field(EmbarkPortId).ToString(),
                        DebarkPortId = dataReader.Int32Field(DebarkPortId).ToString(),
                        Nights = dataReader.ByteField(Nights),
                        DestinationId = dataReader.StringField(DestinationName),
                        IsActive = dataReader.BooleanField(IsActive),
                        MediaItemAddress = dataReader.StringField(MediaItemAddress)
                    };

                    byte[] bytes = await voyage.MediaItemAddress.ImageAddressToByteArray();
                    voyage.ItineraryGraphImage = bytes.ToBitmapSource();
                    voyages.Add(voyage);
                }
            }

            return voyages;
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:37,代码来源:ReferenceDataMapper.cs


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