本文整理汇总了C#中System.Data.DataRow.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# DataRow.ReadInt方法的具体用法?C# DataRow.ReadInt怎么用?C# DataRow.ReadInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.DataRow
的用法示例。
在下文中一共展示了DataRow.ReadInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddPartnerContent
private static void AddPartnerContent(ref PartnerContent defaultContent, DataRow row)
{
if(!row.IsNull("description"))
defaultContent.Description = row.ReadNullableTrimmedString("description");
if (!row.IsNull("title"))
defaultContent.Title = row.ReadNullableTrimmedString("title");
if (!row.IsNull("keywords"))
defaultContent.Keywords = row.ReadNullableTrimmedString("keywords");
if (!row.IsNull("footer"))
defaultContent.Footer = row.ReadNullableTrimmedString("footer");
if (!row.IsNull("header"))
defaultContent.Header = row.ReadNullableTrimmedString("header");
if (!row.IsNull("background_image_name"))
defaultContent.ImageName = row.ReadNullableTrimmedString("background_image_name");
if (!row.IsNull("partner_id"))
defaultContent.PartnerId = row.ReadInt("partner_id");
if (!row.IsNull("partner_user_id"))
defaultContent.UserId = row.ReadInt("partner_user_id");
}
示例2: GuestClaim
internal GuestClaim GuestClaim(DataRow row)
{
return new GuestClaim
{
claim = row.ReadInt("claim$id"),
period = new DatePeriod
{
begin = new System.DateTime?(row.ReadDateTime("claim$datebeg")),
end = new System.DateTime?(row.ReadDateTime("claim$dateend"))
},
tourname = row.ReadNullableTrimmedString("tour$name")
};
}
示例3: CharacteristicRank
internal CharacteristicRank CharacteristicRank(DataRow row)
{
return new CharacteristicRank
{
Id = row.ReadInt("characteristic"),
Name = row.ReadNullableTrimmedString("name"),
Rank = row.ReadNullableDecimal("averagerank")
};
}
示例4: ReservationOrder
public ReservationOrder ReservationOrder(DataRow row, string language, int? claimId, string orderNote)
{
ReservationOrder result = new ReservationOrder
{
id = (!row.IsNull("orderid")) ? row.ReadNullableTrimmedString("orderid") : row.ReadNullableInt("localid").ToString(),
localid = row.ReadNullableInt("localid"),
status = new ReservationStatus
{
id = row.ReadInt("actstatusid"),
description = row.ReadNullableTrimmedString("actstatusname")
},
datefrom = row.ReadUnspecifiedDateTime("datefrom"),
datetill = row.ReadUnspecifiedDateTime("datetill"),
partner = row.IsNull("partnerid") ? null : new ReservationPartner
{
id = row.ReadInt("partnerid"),
name = row.ReadNullableTrimmedString("partnername")
},
pax = new ReservationPax
{
adult = row.ReadInt("adult"),
child = row.ReadInt("child"),
infant = row.ReadInt("infant"),
extra = row.ReadInt("addinfant")
},
note = row.ReadNullableTrimmedString("note"),
price = (row.IsNull("saleprice") || row.IsNull("salecurrency")) ? null : new ReservationOrderPrice
{
total = row.ReadDecimal("saleprice"),
currency = row.ReadNullableTrimmedString("salecurrency")
}
};
XElement peopleXml = row.ReadXml("peoples");
if (peopleXml != null)
{
result.peopleids = new System.Collections.Generic.List<string>();
foreach (XElement peopleNode in peopleXml.DescendantsAndSelf("People"))
{
XElement idNode = peopleNode.Element("Id");
XElement localidNode = peopleNode.Element("LocalId");
result.peopleids.Add((idNode != null) ? idNode.Value : ((localidNode != null) ? localidNode.Value : ""));
}
}
string orderType = row.ReadString("type").ToLower();
if (orderType == "hotel")
{
result.hotel = new HotelReservationOrder
{
id = row.ReadInt("hotelid"),
name = row.ReadNullableTrimmedString("hotelname"),
room = row.IsNull("roomid") ? null : new HotelReservationRoom
{
id = row.ReadInt("roomid"),
name = row.ReadNullableTrimmedString("roomname")
},
htplace = row.IsNull("htplaceid") ? null : new HotelReservationHtplace
{
id = row.ReadInt("htplaceid"),
name = row.ReadNullableTrimmedString("htplacename")
},
meal = row.IsNull("mealid") ? null : new HotelReservationMeal
{
id = row.ReadInt("mealid"),
name = row.ReadNullableTrimmedString("mealname")
}
};
}
else
{
if (orderType == "excursion")
{
result.excursion = new ExcursionReservationOrder
{
id = row.ReadInt("excursid"),
name = row.ReadNullableTrimmedString("excursname"),
time = row.IsNull("extimeid") ? null : new ExcursionReservationTime
{
id = row.ReadInt("extimeid"),
description = row.ReadNullableTrimmedString("extimename")
},
grouptype = row.IsNull("exgrouptypeid") ? null : new ExcursionReservationGroup
{
id = row.ReadInt("exgrouptypeid"),
description = row.ReadNullableTrimmedString("exgrouptypename")
},
language = row.IsNull("languageid") ? null : new ExcursionReservationLanguage
{
id = row.ReadInt("languageid"),
description = row.ReadNullableTrimmedString("languagename")
},
pickuppoint = row.IsNull("geopointfromid") ? null : new PickupPlace
{
id = row.ReadInt("geopointfromid"),
name = row.ReadNullableTrimmedString("geopointfromname")
},
pickuphotel = row.IsNull("fromhotelid") ? null : new PickupPlace
{
id = row.ReadInt("fromhotelid"),
name = row.ReadNullableTrimmedString("fromhotelname")
},
//.........这里部分代码省略.........
示例5: ReservationError
public ReservationError ReservationError(DataRow row)
{
ReservationError result = new ReservationError
{
orderid = row.ReadNullableTrimmedString("orderid"),
number = row.ReadInt("errnum", 0),
message = row.ReadNullableTrimmedString("errmessage"),
usermessage = row.ReadNullableTrimmedString("usermessage"),
isstop = row.ReadBoolean("stop")
};
string errortype = row.ReadNullableTrimmedString("errtype");
if (errortype != null)
{
string text = errortype.ToLower();
if (text != null)
{
if (!(text == "system"))
{
if (text == "user")
{
result.errortype = ReservationErrorType.user;
}
}
else
{
result.errortype = ReservationErrorType.system;
}
}
}
return result;
}
示例6: HotelCatalogObject
internal GuestService.Data.HotelCatalogObject HotelCatalogObject(DataRow row)
{
return new GuestService.Data.HotelCatalogObject { id = row.ReadInt("hotel$inc"), alias = row.ReadNullableTrimmedString("hotel$key"), name = row.ReadNullableTrimmedString("hotel$name"), star = this.HotelStar(row), town = this.Town(row), region = this.Region(row), address = row.ReadNullableTrimmedString("hotel$address"), web = row.ReadNullableTrimmedString("hotel$web"), geoposition = (row.IsNull("map$latitude") || row.IsNull("map$longitude")) ? null : new GeoLocation() };
}
示例7: OnlinePartner
internal GuestService.Data.WebPartner OnlinePartner(DataRow row)
{
return new GuestService.Data.WebPartner { id = row.ReadInt("partner"), passId = row.ReadInt("partpass"), alias = row.ReadNullableTrimmedString("alias") };
}
示例8: QuestionnaireQuestion
internal QuestionnaireQuestion QuestionnaireQuestion(DataRow row)
{
return new QuestionnaireQuestion
{
Id = row.ReadInt("question"),
Category = row.ReadNullableTrimmedString("questioncategory"),
IsMultiple = row.ReadBoolean("ismultiple"),
Text = row.ReadNullableTrimmedString("questiontext"),
IsNote = row.ReadBoolean("isnote"),
NoteCaption = row.ReadNullableTrimmedString("notecaption")
};
}
示例9: QuestionnaireGroup
internal QuestionnaireGroup QuestionnaireGroup(DataRow row)
{
return new QuestionnaireGroup
{
Id = row.ReadInt("questiongroup"),
Caption = row.ReadNullableTrimmedString("caption")
};
}
示例10: ReservationState
public ReservationState ReservationState(DataRow row)
{
return new ReservationState
{
claimId = row.ReadNullableInt("claim_id"),
status = row.IsNull("status_id") ? null : new ReservationStatus
{
id = row.ReadInt("status_id"),
description = row.ReadNullableTrimmedString("status_name")
},
partner = row.IsNull("partner_id") ? null : new ReservationPartner
{
id = row.ReadInt("partner_id"),
name = row.ReadNullableTrimmedString("partner_name")
},
confirmation = row.IsNull("confirm_id") ? null : new ReservationConfirmStatus
{
id = row.ReadInt("confirm_id"),
description = row.ReadNullableTrimmedString("confirm_name")
},
price = (row.IsNull("payprice") || row.IsNull("payrest") || row.IsNull("paycurrency")) ? null : new ReservationPrice
{
total = row.ReadDecimal("payprice"),
topay = row.ReadDecimal("payrest"),
currency = row.ReadNullableTrimmedString("paycurrency")
},
action = new ReservationAction
{
canshowprice = row.ReadBoolean("showprice", false),
canprintvoucher = row.ReadBoolean("printvoucher", false),
canpay = row.ReadBoolean("canpay", false)
},
timelimit = GetClaimTimelimit(row.ReadNullableInt("claim_id"))
};
}
示例11: PartnerContent
private PartnerContent PartnerContent(DataRow row)
{
return new PartnerContent()
{
Description = row.ReadNullableTrimmedString("description"),
Title = row.ReadNullableTrimmedString("title"),
Keywords = row.ReadNullableTrimmedString("keywords"),
Footer = row.ReadNullableTrimmedString("footer"),
Header = row.ReadNullableTrimmedString("header"),
ImageName = row.ReadNullableTrimmedString("background_image_name"),
PartnerId = row.ReadInt("partner_id"),
UserId = row.ReadInt("partner_user_id")
};
}
示例12: DepartureTransfer
internal DepartureTransfer DepartureTransfer(bool useNameField, DataRow row)
{
return new DepartureTransfer
{
id = row.ReadInt("transfer$inc"),
ident = row.ReadNullableTrimmedString("transfer$ident"),
date = row.ReadUnspecifiedDateTime("transfer$tdate"),
pickup = (row.IsNull("transfer$pickdate") || row.IsNull("transfer$picktime")) ? null : new System.DateTime?(row.ReadUnspecifiedDateTime("transfer$pickdate").Date.Add(row.ReadUnspecifiedDateTime("transfer$picktime").TimeOfDay)),
flight = (!(row.ReadNullableInt("transfer$freight") > 0)) ? null : new DepartureFlight
{
id = row.ReadInt("transfer$freight"),
name = row.ReadNullableTrimmedString(useNameField ? "f$name" : "f$lname"),
source = (!(row.ReadNullableInt("f$srcport") > 0)) ? null : new Airport
{
id = row.ReadInt("f$srcport"),
alias = row.ReadNullableTrimmedString("port1$alias"),
name = row.ReadNullableTrimmedString(useNameField ? "port1$name" : "port1$lname"),
town = (!(row.ReadNullableInt("st$inc") > 0)) ? null : new Town
{
id = row.ReadInt("st$inc"),
name = row.ReadNullableTrimmedString("st$name")
}
},
target = (!(row.ReadNullableInt("f$trgport") > 0)) ? null : new Airport
{
id = row.ReadInt("f$trgport"),
alias = row.ReadNullableTrimmedString("port2$alias"),
name = row.ReadNullableTrimmedString(useNameField ? "port2$name" : "port2$lname"),
town = (!(row.ReadNullableInt("tt$inc") > 0)) ? null : new Town
{
id = row.ReadInt("tt$inc"),
name = row.ReadNullableTrimmedString(useNameField ? "tt$name" : "tt$lname")
}
},
takeoff = (row.IsNull("transfer$fdate") || row.IsNull("f$srctime")) ? null : new System.DateTime?(row.ReadUnspecifiedDateTime("transfer$fdate").Date.Add(row.ReadUnspecifiedDateTime("f$srctime").TimeOfDay)),
landingtime = row.IsNull("f$trgtime") ? null : new System.TimeSpan?(row.ReadUnspecifiedDateTime("f$trgtime").TimeOfDay)
},
hotel = (!(row.ReadNullableInt("transfer$hoteldest") > 0)) ? null : new DepartureDestinationHotel
{
id = row.ReadInt("transfer$hoteldest"),
name = row.ReadNullableTrimmedString(useNameField ? "h2$name" : "h2$lname"),
town = (!(row.ReadNullableInt("t2$inc") > 0)) ? null : new Town
{
id = row.ReadInt("t2$inc"),
name = row.ReadNullableTrimmedString(useNameField ? "t2$name" : "t2$lname")
},
region = (!(row.ReadNullableInt("r2$inc") > 0)) ? null : new Region
{
id = row.ReadInt("r2$inc"),
name = row.ReadNullableTrimmedString(useNameField ? "r2$name" : "r2$lname")
}
},
note = row.ReadNullableTrimmedString("transfer$infonote"),
language = row.ReadNullableTrimmedString("language$alias"),
indiviadual = row.ReadNullableTrimmedString("transfer$indmark") == "IND",
servicename = row.ReadNullableTrimmedString(useNameField ? "s$name" : "s$lname"),
guide = (!(row.ReadNullableInt("transfer$guide") > 0)) ? null : new DepartureWorker
{
name = row.ReadNullableTrimmedString(useNameField ? "guide$name" : "guide$lname"),
phone = row.ReadNullableTrimmedString("guide$mobile")
},
guide2 = (!(row.ReadNullableInt("transfer$guide2") > 0)) ? null : new DepartureWorker
{
name = row.ReadNullableTrimmedString(useNameField ? "guide2$name" : "guide2$lname"),
phone = row.ReadNullableTrimmedString("guide2$mobile")
}
};
}
示例13: DepartureHotel
internal DepartureHotel DepartureHotel(bool useNameField, DataRow row)
{
return new DepartureHotel
{
id = row.ReadInt("transfer$hoteldep"),
name = row.ReadNullableTrimmedString(useNameField ? "h1$name" : "h1$lname")
};
}
示例14: ExcursionRankInfo
internal ExcursionRankInfo ExcursionRankInfo(DataRow row)
{
return new ExcursionRankInfo
{
Excursion = row.ReadInt("excursion"),
AverageRank = row.ReadNullableDecimal("averagerank"),
SurveyCount = row.ReadInt("surveycount", 0)
};
}
示例15: CheckPromoCodeResult
public CheckPromoCodeResult CheckPromoCodeResult(DataRow row)
{
return new CheckPromoCodeResult
{
errorcode = row.ReadInt("result"),
errormessage = row.ReadNullableTrimmedString("message")
};
}