//
//  WorkOrderDataControllerx.h
//  EAMiPad
//
//  Created by Lakshmi Kothapalli on 1/20/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "RecordDataController.h"
#import <CoreLocation/CoreLocation.h>

@class R5EVENTS;
@class EAMWorkOrders;
@class DBQuery;
@class R5ADDETAILS;

@interface WorkOrderDataController : RecordDataController
{
    R5EVENTS   *_recordValue;
}


@property (nonatomic, strong)               NSString                *workOrderNumber;
@property (nonatomic, strong)               EAMWorkOrders           *workOrder;
@property (nonatomic)                       BOOL                    isAddMode;
@property (nonatomic)                       BOOL                    createWorkRequest;
@property (nonatomic)                       BOOL                    jTAuthIsDelete;
@property (nonatomic)                       BOOL                    isCompleted;
@property (nonatomic)                       BOOL                    isWorkRequest;
@property (nonatomic)                       BOOL                    bStatusChanged;
@property (nonatomic)                       BOOL                    isCloseWorkOrder;
@property (nonatomic, strong)               R5ADDETAILS             *selectedComment; //commentsEnhancement
@property (nonatomic)                       BOOL                    isEquipmentWorkOrder;
@property (nonatomic)                       BOOL                    equipmentChanged;
@property (nonatomic, assign)               BOOL                    isCustomFieldValueChanged;
@property (nonatomic, strong)               NSDictionary            *UDFields;
@property (nonatomic        )               BOOL                     hasActivities;
@property (nonatomic        )               BOOL                     hasTransaction;
@property (nonatomic        )               BOOL                     hasUpdatedChecklists;
@property (nonatomic        )               BOOL                     isStandardWOChanged;
@property (nonatomic, strong)               NSString                 *oldStandardWO;

- (void)loadRecordViewLayoutForWorkOrder;
- (LOVData *)getLOVDataSource:(NSString *)lovName;
- (PickerData *)getPickerDataSource:(NSString *)fieldName;
- (BOOL)validateInput;
- (void)addWorkOrder;
- (void)updateWorkOrder;
- (void)updateComments;
- (void)deleteWorkOrder;
- (void)getDefaultWO;
- (void)getWorkOrder;
- (void)getWorkOrder:(NSString *)workOrder withOrg:(NSString *)org;
- (void)getJSIWorkOrder:(NSString *)workOrder withOrg:(NSString *)org;
- (void)getWorkOrdersList:(NSString *)searchString andCurrentPosition:(NSInteger )currentPosition;
- (void)getiPhoneAssignedWorkOrdersList:(NSString *)searchString andCurrentPosition:(NSInteger )currentPosition;
- (void)getHospitalityAssignedWorkOrdersList:(NSString *)searchString andCurrentPosition:(NSInteger )currentPosition;
- (void)getHospitalityUnassignedWorkOrdersList:(NSString *)searchString andCurrentPosition:(NSInteger )currentPosition;
- (void)enableFields:(BOOL)setReadOnly;
//eSignature screen
- (NSString *)getFAAMODInstallValue;
- (BOOL)checkESignatureRequired:(NSString *)entity
                               :(NSString *)status
                               :(NSString *)newStatus
                               :(NSString *)equipment;
//eSignature screen
//closeWO
- (void)getComments;
- (BOOL)validateWorkOrderLocation:(CLLocationCoordinate2D )workOrderCoordinate;
//

- (void)assignSecurityValues;
- (void)getEquipmentWarranty;
- (BOOL)isWOListByAssignedTo;
- (void)setReplaceMECValue:(NSString *)value;
- (void)setConfirmDeleteValue:(NSString *)value;
- (void)addCustomFields;
- (void)addOrRemoveLinearAssetFields;
- (void)getJSIWorkOrdersList:(NSString *)searchString andCurrentPosition:(NSInteger )currentPosition;
- (void)clearServiceCodeDetail;
- (void)addCustomFields;
- (void)getActivitiesWithChecklist;
- (void)updateCurrentLocation;
@end
