//
//  ToolUsageDataController.h
//  EAMiPad
//
//  Created by Nilesh Tupe on 9/22/16.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "RecordDataController.h"
#import "R5TOOLUSAGE.h"
#import "EAMToolUsage.h"

@class EAMAppDelegate;
@class R5TOOLUSAGE;
@class GridData;
@class DBQuery;

@interface ToolUsageDataController : RecordDataController
{
    R5TOOLUSAGE *_recordValue;
}
@property (nonatomic, strong)               NSString                *activity;
@property (nonatomic, unsafe_unretained)    EAMAppDelegate          *appDelegate;
@property (nonatomic, strong)               DBQuery                 *dbqueryHandler;
@property (nonatomic, strong)               NSString                *workOrderNumber;
@property (nonatomic, strong)               NSString                *transactionType;
@property (nonatomic)                       BOOL                    isAddMode;
@property (nonatomic,strong)                EAMToolUsage            *toolUsage;
@property (nonatomic, assign)               BOOL                    isMultiEquipment;
@property (nonatomic)                       BOOL                    recordViewDisabled;
@property (nonatomic)                       BOOL                    isWorkOrderCompleted;



- (void)loadRecordViewLayoutForCosts;
- (PickerData *)getPickerDataSource:(NSString *)fieldName;
- (LOVData *)getLOVDataSource:(NSString *)lovName;

- (void)getToolUsageDefault;
- (void)getToolUsageRecord;

- (void) addToolUsage;
- (void) updateToolUsage;

- (void)deleteToolUsage;


- (BOOL)validateInput;

- (void)getToolUsageGridSummary;

// for disconnected mode
- (void)getAddCostRecord;

- (void)checkCompletedChildWO;
- (void)saveSplitData;
- (void)enableEquipmentFieldForTransactionLog:(BOOL ) setReadOnly;
- (void)disableFields:(BOOL ) setReadOnly;
- (void)disableAllFields:(BOOL ) setReadOnly;
- (void)disableFieldsForMECChilds:(BOOL ) setReadOnly;

@end
