public DBFField(string aFieldName, DBFNativeDbType aType, Int32 aFieldLength, Int32 aDecimalCount) { Name = aFieldName; DataType = aType; FieldLength = aFieldLength; DecimalCount = aDecimalCount; }
public DBFField(string aFieldName, DBFNativeDbType aType, Int32 aFieldLength) { Name = aFieldName; DataType = aType; FieldLength = aFieldLength; }
public const string Unknown = "?"; //Unknown value static public DbType FromNative(DBFNativeDbType aByte) { switch (aByte) { case DBFNativeDbType.Char: return DbType.AnsiStringFixedLength; case DBFNativeDbType.Logical: return DbType.Boolean; case DBFNativeDbType.Numeric: return DbType.Decimal; case DBFNativeDbType.Date: return DbType.Date; case DBFNativeDbType.Float: return DbType.Decimal; case DBFNativeDbType.Memo: return DbType.AnsiString; default: throw new DBFException( string.Format("Unsupported Native Type {0}", aByte)); } }
public DBFField(string aFieldName, DBFNativeDbType aType) { Name = aFieldName; DataType = aType; }
static public Type TypeForNativeDBType(DBFNativeDbType aType) { switch (aType) { case DBFNativeDbType.Char: return typeof(string); case DBFNativeDbType.Date: return typeof(DateTime); case DBFNativeDbType.Numeric: return typeof(decimal); case DBFNativeDbType.Logical: return typeof(bool); case DBFNativeDbType.Float: return typeof(float); case DBFNativeDbType.Memo: return typeof(DBFMemoValue); default: throw new ArgumentException("Unsupported Type"); } }