//
//  PermitToWorkDataController.h
//  EAMNext
//
//  Created by Sreelakshmi Mereddy on 9/10/18.
//

#import "RecordDataController.h"
#import "R5PERMITTOWORK.h"
#import "R5SIGNOFFPERMITTOWORK.h"
#import "R5REVIEWPERMITTOWORK.h"
#import "DBQuery.h"


@interface PermitToWorkDataController : RecordDataController
{
    R5PERMITTOWORK *_recordValue;
}
@property (nonatomic        )               BOOL            bStatusChanged;
@property (nonatomic, strong)               DBQuery                 *dbqueryHandler;
@property (nonatomic, strong)   NSDictionary                *customFields;
@property (nonatomic, assign)               BOOL            isCustomFieldValueChanged;
@property (nonatomic, strong)   NSDictionary                *UDFields;
- (void) loadRecordViewLayoutForPermitToWork;
- (void)getPermitToWorkList:(NSString *)searchString andCurrentPosition:(NSInteger )currentPosition;
- (void)getPermitToWork;
- (void)updatePermitToWork;
- (BOOL)validateInput;
- (void)enableFields:(BOOL)setReadOnly;
- (BOOL)checkESignatureRequired:(NSString *)entity
                               withOldStatus:(NSString *)status
                               forNewStatus:(NSString *)newStatus;
-(void)signOffPermitToWork:(R5SIGNOFFPERMITTOWORK *)signOffRecord;
-(void)reviewPermitToWork:(R5REVIEWPERMITTOWORK *)reviewRecord;
-(void)addCustomFields;
-(void)updateIsolatedValue;
@end
