Esempio n. 1
0
 public DBFField(string aFieldName,
                 NativeDbType aType,
                 Int32 aFieldLength)
 {
     Name = aFieldName;
     DataType = aType;
     FieldLength = aFieldLength;
 }
Esempio n. 2
0
 public DBFField(string aFieldName,
                 NativeDbType aType,
                 Int32 aFieldLength,
                 Int32 aDecimalCount)
 {
     Name = aFieldName;
     DataType = aType;
     FieldLength = aFieldLength;
     DecimalCount = aDecimalCount;
 }
Esempio n. 3
0
 public static DbType FromNative(NativeDbType aByte)
 {
     switch (aByte)
     {
         case NativeDbType.Char:
             return DbType.AnsiStringFixedLength;
         case NativeDbType.Logical:
             return DbType.Boolean;
         case NativeDbType.Numeric:
             return DbType.Decimal;
         case NativeDbType.Date:
             return DbType.Date;
         case NativeDbType.Float:
             return DbType.Decimal;
         case NativeDbType.Memo:
             return DbType.AnsiString;
         default:
             throw new DBFException(
                 string.Format("Unsupported Native Type {0}", aByte));
     }
 }
Esempio n. 4
0
 public static Type TypeForNativeDBType(NativeDbType aType)
 {
     switch(aType)
     {
         case NativeDbType.Char:
             return typeof (string);
         case NativeDbType.Date:
             return typeof (DateTime);
         case NativeDbType.Numeric:
             return typeof (decimal);
         case NativeDbType.Logical:
             return typeof (bool);
         case NativeDbType.Float:
             return typeof (float);
         case NativeDbType.Memo:
             return typeof (MemoValue);
         default:
             throw new ArgumentException("Unsupported Type");
     }
 }
Esempio n. 5
0
 public DBFField(string aFieldName, NativeDbType aType)
 {
     Name = aFieldName;
     DataType = aType;
 }