//
//  NonconformityDataController.h
//  EAMNext
//
//  Created by Surojit Bhattacharya on 9/13/16.
//
//

#import <Foundation/Foundation.h>
#import "R5NONCONFORMITIESLEGACY.h"
#import "RecordDataController.h"
#import "EAMAppDelegate.h"

@class WebQueryParameters;
@class EAMAppDelegate;
@class DBQuery;
@class GridData;

@interface NonconformityLegacyDataController : RecordDataController
{
    R5NONCONFORMITIESLEGACY *_recordValue;
}

@property (nonatomic) BOOL isAddMode;

- (BOOL)validateInput;
- (void)addNonconformity;
- (void)updateNonconformity;
- (void)deleteNonconformity;
- (void)addObservation;
- (void)getNonconformities;
- (void)getNonconformitiesByEquipmentCode:(NSString *)equipmentCode;
- (void)getWONonconformities:(NSString *)wonum withOrg:(NSString *)woorg;
- (void)getNonconformity;
- (void) getDefaultNonconformity;
- (void)closeAllNonconformity : (NSString *)workorder;
- (void)repairedAllNonconformity: (NSString *)workorder;
- (void)resetAllNonconformity : (NSString *)workorder;
- (LOVData *)getLOVDataSource:(NSString *)lovName;
- (PickerData *)getPickerDataSource:(NSString *)fieldName;
- (void)enableFields:(BOOL)setReadOnly;
- (void)enableFieldsLASec:(BOOL)setReadOnly;
- (R5NONCONFORMITIESLEGACY *)convertModelForEditMode:(R5NONCONFORMITIESLEGACY *)nonconformity;
- (void) updatePickerValues;
-(BOOL) isEquipmentHaveDeptSecurity:(NSString *)evtcode;
- (void)addOrRemoveLinearAssetFields;
-(NSDecimalNumber *)calculateTotalEstimatedCosts:(R5NONCONFORMITIESLEGACY *)nonConformity;
-(R5NONCONFORMITIESLEGACY *)setVMRSCodeXMLPathForDisplay:(R5NONCONFORMITIESLEGACY *)mRecordValue;
@end
