Esempio n. 1
0
 sealed class NDT : MB <DateTime?>   { public override void To(IMapDataDestination d, object o, int i, DateTime?v)
                                       {
                                           d.SetNullableDateTime(o, i, v);
                                       }
Esempio n. 2
0
 public override void Map(IMapDataSource source, object sourceObject, int sourceIndex, IMapDataDestination destination, object destinationObject, int destinationIndex)
 {
     if(source.IsNull(sourceObject, sourceIndex))
     {
         destination.SetNullableDateTime(destinationObject, destinationIndex, null);
     }
     else
     {
         destination.SetNullableDateTime(destinationObject, destinationIndex, Convert.ToDateTime(source.GetString(sourceObject, sourceIndex)));
     }
 }