//
//  EnhancedChecklistDataController.h
//  EAMiPad
//
//  Created by Ram Madichetty on 9/5/13.
//
//

#import <Foundation/Foundation.h>
#import "R5ACTCHECKLISTS.h"
#import "LOVData.h"
#import "PickerData.h"
#import "RecordDataController.h"

@protocol EnhancedChecklistDataControllerDelegate

- (void)EnhancedChecklistDataControllerGetSuccess:(NSArray *)items withHeader:(NSDictionary *)header;
- (void)EnhancedChecklistDataControllerUpdateSuccess:(NSDictionary *)data;
- (void)EnhancedChecklistDataControllerFailed:(NSString *)fault;
- (void)EnhancedChecklistDataControllerPerformedSuccess:(NSDictionary *)data;
- (void)EnhancedChecklistDataControllerReviewedSuccess:(NSDictionary *)data;
- (void)EnhancedChecklistDataControllerCreateFollowUpSuccess:(NSDictionary *)data;
- (void)EnhancedChecklistDataControllerGetDefaultSuccess:(NSArray *)items withHeader:(NSDictionary *)header;
- (void)EnhancedChecklistDataControllerGetEquipmentDepartmentSuccess:(NSString *)department;

@end

@interface EnhancedChecklistDataController : RecordDataController


@property (nonatomic,strong,readonly) NSString *workOrder;
@property (nonatomic,strong,readonly) NSString *organization;
@property (nonatomic,strong) NSString *activity;
@property (nonatomic,strong) NSString *mSelectedJob;
@property (nonatomic) ConnectionMode  connectionMode;
@property (nonatomic,strong) R5ACTCHECKLISTS *currentItem;
@property (nonatomic, assign)   NSInteger   failedCount;

- (id)initWithWorkOrder:(NSString *)workOrder andOrganization:(NSString *)organization;
- (void)getChecklistDefault;
- (void)getChecklist;
- (void)getChecklistItems;
- (void)getChecklistWithParameters:(WebQueryParameters *)parameters withSession:(NSString *)sessionID;
- (void)performChecklistWithUser:(NSString *)user
                    withPassword:(NSString *)password
               withSignatureType:(NSString *)signatureType;
- (void)reviewChecklistWithUser:(NSString *)user
                   withPassword:(NSString *)password
              withSignatureType:(NSString *)signatureType;
- (void)CreateFollowUpWorkOrder;
- (void)updateChecklist:(NSArray *)items;
- (BOOL)canUpdate:(NSString *__autoreleasing *)errorMessage;
- (LOVData *)getLOVDataSource:(NSString *)lovName;
- (PickerData *)getPickerDataSource:(NSString *)fieldName;
- (void)updateFieldValue:(NSString *)fieldName withValues:(NSArray *)fieldValues forItem:(R5ACTCHECKLISTS *)checklistItem;
-(void) validateWoOrgOptionCHCKLREG;
-(void) getComments:(NSString *) pTaskChecklistCode;
- (void)CreateDeferredMaintenance;
- (void)getEquipmentDepartment:(NSString *) code withOrg:(NSString *)org withDesc:(NSString *) desc;
-(void) getRepeatedOccurenceRecord:(R5ACTCHECKLISTS *) pChecklistItem;


@end

