public with sharing class updateTenDeleteBackHandler extends Oly_TriggerHandler {
	private Map<Id, Tender_information__c> newMap;
	private Map<Id, Tender_information__c> oldMap;
	private List<Tender_information__c> newList;
	private List<Tender_information__c> oldList;
	public updateTenDeleteBackHandler() {
		this.newMap = (Map<Id, Tender_information__c>) Trigger.newMap;
		this.oldMap = (Map<Id, Tender_information__c>) Trigger.oldMap;
		this.newList = (List<Tender_information__c>) Trigger.new;
		this.oldList = (List<Tender_information__c>) Trigger.old;
	}
	protected override void beforeUpdate() {
		updateTenDel();
	}

	private void updateTenDel() {
		List<Tender_information__c> updateTenList = new List<Tender_information__c>();
		for (Tender_information__c TenoldInfo : newList) {
			if(TenoldInfo.Logical_delete__c == false && (TenoldInfo.Logical_delete__c != oldMap.get(TenoldInfo.Id).Logical_delete__c)){
				TenoldInfo.Retain_Tender__c = null;
			}
			if(TenoldInfo.Retain_Tender__c == null && (TenoldInfo.Retain_Tender__c != oldMap.get(TenoldInfo.Id).Retain_Tender__c)){
				TenoldInfo.Logical_delete__c = false;
			}
			// updateTenList.add(TenoldInfo);
		}
		// if(updateTenList.size()>0){
		// 	update updateTenList;
		// }
	}
}