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


C# DataRow.ReadNullableUnspecifiedDateTime方法代码示例

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


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

示例1: ReservationPeople

 public ReservationPeople ReservationPeople(DataRow row)
 {
     return new ReservationPeople
     {
         id = (!row.IsNull("peopleid")) ? row.ReadNullableTrimmedString("peopleid") : row.ReadNullableInt("localid").ToString(),
         localid = row.ReadNullableInt("localid"),
         agetype = row.ReadNullableTrimmedString("agetype"),
         gender = row.ReadNullableTrimmedString("gender"),
         name = row.ReadNullableTrimmedString("name"),
         born = row.ReadNullableUnspecifiedDateTime("born"),
         age = row.ReadNullableInt("age"),
         passport = (row.IsNull("pserie") && row.IsNull("pnumber")) ? null : new ReservationPeoplePassport
         {
             serie = row.ReadNullableTrimmedString("pserie"),
             number = row.ReadNullableTrimmedString("pnumber"),
             issue = row.ReadNullableUnspecifiedDateTime("pissue"),
             valid = row.ReadNullableUnspecifiedDateTime("pvalid")
         },
         address = row.ReadNullableTrimmedString("address"),
         phone = row.ReadNullableTrimmedString("phones"),
         email = row.ReadNullableTrimmedString("email"),
         comment = row.ReadNullableTrimmedString("comment")
     };
 }
开发者ID:alex-prokopenya,项目名称:GuestService_partner,代码行数:24,代码来源:BookingProvider.cs

示例2: ExcursionOrderCalculatePrice

 public ExcursionOrderCalculatePrice ExcursionOrderCalculatePrice(DataRow row)
 {
     return new ExcursionOrderCalculatePrice
     {
         id = row.ReadInt("excursion$inc"),
         name = row.ReadNullableTrimmedString("excursion$name"),
         date = row.ReadUnspecifiedDateTime("date"),
         time = row.IsNull("time$inc") ? null : new ExcursionTime
         {
             id = row.ReadInt("time$inc"),
             name = row.ReadNullableTrimmedString("time$name")
         },
         language = row.IsNull("lang$inc") ? null : new Language
         {
             id = row.ReadInt("lang$inc"),
             name = row.ReadNullableTrimmedString("lang$name"),
             alias = row.ReadNullableTrimmedString("lang$alias")
         },
         group = row.IsNull("group$inc") ? null : new ExcursionGroup
         {
             id = row.ReadInt("group$inc"),
             name = row.ReadNullableTrimmedString("group$name")
         },
         departure = row.IsNull("departure$inc") ? null : new GeoArea
         {
             id = row.ReadInt("departure$inc"),
             name = row.ReadNullableTrimmedString("departure$name"),
             alias = row.ReadNullableTrimmedString("departure$alias")
         },
         pax = new BookingPax
         {
             adult = row.ReadInt("adult", 0),
             child = row.ReadInt("child", 0),
             infant = row.ReadInt("infant", 0)
         },
         contact = new ExcursionContact
         {
             name = row.ReadNullableTrimmedString("contact$name")
         },
         note = row.ReadNullableTrimmedString("note"),
         price = row.IsNull("price") ? null : new OrderPrice
         {
             price = row.ReadDecimal("price"),
             currency = row.ReadNullableTrimmedString("currency$alias")
         },
         closesaletime = row.ReadNullableUnspecifiedDateTime("closesaletime"),
         issaleclosed = row.ReadBoolean("isclosed"),
         isstopsale = row.ReadBoolean("isstopsale")
     };
 }
开发者ID:alex-prokopenya,项目名称:GuestService_partner,代码行数:50,代码来源:BookingProvider.cs


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