//
//  EAMField.h
//  EAMiPad
//
//  Created by Satish on 11/9/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

extern NSString * const FIELD_CHAR;
extern NSString * const FIELD_NUM;
extern NSString * const FIELD_INT;
extern NSString * const FIELD_BOOL;
extern NSString * const FIELD_DATE;
extern NSString * const FIELD_DATI;
extern NSString * const FIELD_TIME;
extern NSString * const FIELD_PICKER;
extern NSString * const FIELD_COMBO;
extern NSString * const FIELD_LOV1;
extern NSString * const FIELD_LOV2;
extern NSString * const FIELD_LOV3;
extern NSString * const FIELD_MEMO1;
extern NSString * const FIELD_MEMO2;
extern NSString * const FIELD_TEXTAREA;
extern NSString * const FIELD_SEGMENT;
extern NSString * const FIELD_NUMDESC;
extern NSString * const FIELD_DOCUMENT;
extern NSString * const FIELD_LOCATION;
extern NSString * const FIELD_COMMENTS;
extern NSString * const FIELD_LOV4;
extern NSString * const FIELD_LOV5;
extern NSString * const FIELD_LOV6;

typedef enum {
    FieldConnectionTypeNone = 0,
    FieldConnectionTypeConnected,
    FieldConnectionTypeDisconnected
} FieldConnectionType;

@interface EAMField : NSObject
{
    
}

@property (nonatomic        ) int           order;
@property (nonatomic        ) int           sequenceNumber;
@property (nonatomic        ) int           section;
@property (nonatomic        ) int           orderInSection;
@property (nonatomic, strong) NSString      *fieldName;
@property (nonatomic, strong) NSString      *fieldLabel;
@property (nonatomic, strong) NSString      *fieldLabelEnglish;
@property (nonatomic, strong) NSString      *fieldDataType;
@property (nonatomic, strong) NSString      *fieldValue;
@property (nonatomic, strong) NSString      *fieldHint;
@property (nonatomic        ) BOOL          isLookUp;
@property (nonatomic        ) BOOL          fieldReadOnly;
@property (nonatomic        ) BOOL          fieldRequired;
@property (nonatomic) FieldConnectionType   connectionType;
@property (nonatomic        ) BOOL          fieldHidden;
@property (nonatomic        ) int           maxLength;
@property (nonatomic, strong) NSString      *eventName;
@property (nonatomic        ) int           decimals;
@property (nonatomic, strong) NSString      *fieldCurr;


- (id)initWithDictionary:(NSDictionary *)dict;

- (EAMField *) initField:(NSString *)name 
                    type:(NSString *)type
                   label:(NSString *)label
                   value:(NSString *)value
                    hint:(NSString *)hint
                readOnly:(BOOL )readOnly
                required:(BOOL )required
               maxlength:(int )maxlen;

@end
