package com.gx.obe.evaluation.step.review.action;

import org.eclipse.swt.SWT;

import com.gx.obe.action.bean.Action;
import com.gx.obe.action.listener.ActionListener;
import com.gx.obe.evaluation.step.listener.ExpertEvaluationListener;
import com.gx.obe.evaluation.step.review.composite.EditPriceComposite;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;

public class EditPriceAction extends Action {
	
	public void run() {
		ActionListener listener = this.getListener();
		if (null == listener) return;
		listener.onLoad(this);
		
//		TenderProjectEntity tenderProjectEntity = (TenderProjectEntity) this.getData("tenderProjectEntity");
		TenderProjectEntity tenderProjectEntity = this.getTenderProject();
		EvaluationStep evaluationStep = (EvaluationStep) this.getData("evaluationStep");
		TenderProjectRuleEntity tenderProjectRuleEntity = this.getTenderProjectRule();
		ExpertEvaluationListener expertEvaluationListener = (ExpertEvaluationListener) this.getData("expertEvaluationListener");
		
		EditPriceComposite composite = new EditPriceComposite(listener.getParentComposite(), SWT.NONE);
		composite.addExpertEvaluationListener(expertEvaluationListener);
		composite.refresh(tenderProjectEntity, evaluationStep, tenderProjectRuleEntity, null != this.getData("hideLeft"));
		listener.loadComposite(this, composite);
	}
	
}
