本文整理汇总了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)
};
}
示例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)
};
}
示例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;
}
示例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)
};
}
示例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)
};
}
示例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;
}