//
//  FlexBusinessRulesDataController.h
//  EAMiPadDisConnected
//
//  Created by Divya Sivakumar on 5/2/16.
//
//

#import "RecordDataController.h"

@class EAMAppDelegate;
@class R5FLEXSQL;
@class DBQuery;
@class GridData;
@class EAMFlexBusinessRules;

@interface FlexBusinessRulesDataController : RecordDataController
{
    R5FLEXSQL *_recordValue;
}

@property (nonatomic, strong)               EAMFlexBusinessRules    *flexRules;
@property (nonatomic, unsafe_unretained)    EAMAppDelegate          *appDelegate;
@property (nonatomic, strong)               DBQuery                 *dbqueryHandler;
@property (nonatomic)                       BOOL                    departmentSecurityReadOnly;
@property (nonatomic)                       BOOL                    jTAuthReadOnly;
@property (nonatomic)                       BOOL                    isAddMode;
@property (nonatomic)                       BOOL                    mbJTAuthIsDelete;
@property (nonatomic)                       BOOL                    recordViewDisabled;

-(void)getFlexList;
-(void)getDefaultFlexModel;
-(void)getFlexModel:(R5FLEXSQL *)model;
- (PickerData *)getPickerDataSource:(NSString *)fieldName;
- (LOVData *)getLOVDataSource:(NSString *)lovName;
- (BOOL)validateInput;
-(void)addFlex;
-(void)updateFlex;
-(void)deleteFlex;
-(BOOL)validateFlexSQL:(NSString *)sql;
-(void)enableFields:(BOOL)setReadOnly isInsert:(BOOL)isInsert;
@end

