//
//  DocumentsDataController.h
//  EAMiPad
//
//  Created by Lakshmi Kothapalli on 04/23/2012.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "RecordDataController.h"
#import "R5PERMITTOWORKLOTO.h"

@class EAMAppDelegate;
@class R5DOCUMENTS;
@class FileHandler;
@class EAMDocuments;
@class GridData;

@interface DocumentsDataController : RecordDataController
{
    R5DOCUMENTS   *_recordValue;
}

@property (nonatomic, unsafe_unretained)    EAMAppDelegate      *appDelegate;
@property (nonatomic, strong)               FileHandler             *fileHandler;
@property (nonatomic, strong)               NSString                *codeNumber;
@property (nonatomic, strong)               EAMDocuments            *eamDocuments;
@property (nonatomic, strong)               NSString                *entity;
@property (nonatomic, strong)               NSString                *equipOrg;
@property (nonatomic, strong)               NSString                *department;
@property (nonatomic, strong)               NSDictionary            *workOrderData;
@property (nonatomic)                       BOOL                    isCreateWorkRequestScreen; //to check if it is WorkRequest screen

- (void)addDocument;
- (void)deleteDocument;
- (void)addDocumentAssociation;
- (void)addNonConformityDocumentAssociation;
- (void)getDocuments;
- (void)getDocumentsForPrefix:(NSString *)prefix;
//- (void)getFileDocument:(NSString *)docName;
- (void)getFileDocument:(NSString *)docName andDocumentCode:(NSString *)docCode;
- (void)uploadDocument:(NSString *)docName andDocumentCode:(NSString *)docCode;
- (BOOL)validateInput;
- (void) getEquipmentDocuments;
- (void) getReceiptDocuments;
- (void) getNoteBookDocuments;
- (void)getNonConformityDocuments;
- (void)getNonConformityDocumentsByCode;
-(void) getChecklistDocuments;
-(void) getDocumentsForLoto;
-(void) getDocumentsForLotoIsolation :(NSString *) pPrefix forRevision:(NSNumber *) pRevision;

- (void)getObservationDocuments;
- (void)uploadDocument2:(R5DOCUMENTS *)document;
- (NSString *)getFileNameFromURLType:(NSString *)docFileType fileName:(NSString *)docFileName;
-(void) addDocumentsForRecordView:(NSMutableArray *) pDocList;

@end
