コード例 #1
0
 public static long GetInt64(IDataReader reader, int index, EntityBase Entity)
 {
     if (reader.IsDBNull(index))
     {
         Entity.AddNullField(reader.GetName(index));
         return((long)0);
     }
     return(reader.GetInt64(index));
 }
コード例 #2
0
 public static string GetString(IDataReader reader, int index, EntityBase Entity)
 {
     if (reader.IsDBNull(index))
     {
         Entity.AddNullField(reader.GetName(index));
         return(string.Empty);
     }
     return(reader.GetString(index));
 }
コード例 #3
0
 public static int GetInt32(IDataReader reader, int index, EntityBase Entity)
 {
     if (reader.IsDBNull(index))
     {
         Entity.AddNullField(reader.GetName(index));
         return(0);
     }
     return(reader.GetInt32(index));
 }
コード例 #4
0
 public static Guid GetGuid(IDataReader reader, int index, EntityBase Entity)
 {
     if (reader.IsDBNull(index))
     {
         Entity.AddNullField(reader.GetName(index));
         return(Guid.Empty);
     }
     return(reader.GetGuid(index));
 }
コード例 #5
0
 public static DateTime GetDateTime(IDataReader reader, int index, EntityBase Entity)
 {
     if (reader.IsDBNull(index))
     {
         Entity.AddNullField(reader.GetName(index));
         return(new DateTime(1900, 1, 1));
     }
     return(reader.GetDateTime(index));
 }
コード例 #6
0
 public static byte GetByte(IDataReader reader, int index, EntityBase Entity)
 {
     if (reader.IsDBNull(index))
     {
         Entity.AddNullField(reader.GetName(index));
         return((byte)0);
     }
     return(reader.GetByte(index));
 }
コード例 #7
0
 public static bool GetBoolean(IDataReader reader, int index, EntityBase Entity)
 {
     if (reader.IsDBNull(index))
     {
         Entity.AddNullField(reader.GetName(index));
         return(false);
     }
     return(reader.GetBoolean(index));
 }