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

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;

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.MultiRoundsPriceComposite;
import com.gx.obe.evaluation.step.review.composite.RemoteMultiRoundsPriceComposite;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
/**
 * @Description: 多轮报价评审
 * @author guoyr
 */
public class MultiWheelPriceEvaluationAction extends Action {
		
	@Override
	public void run() {
		ActionListener actionListener = this.getListener();
		if(null != actionListener){
			actionListener.onLoad(this);
			EvaluationStep evaluationStep = (EvaluationStep)this.getData("evaluationStep");
			Composite composite = actionListener.getParentComposite();
			ExpertEvaluationListener expertEvaluationListener = (ExpertEvaluationListener)this.getData("expertEvaluationListener");
			if(com.gx.obe.components.core.enumeration.EvaluationStepEnum.REMOTE.equals(evaluationStep.getEvaluationParamByKey("BidPriceSource"))){
				RemoteMultiRoundsPriceComposite evaluationComposite = new RemoteMultiRoundsPriceComposite(composite, this, SWT.NONE);
				evaluationComposite.addExpertEvaluationListener(expertEvaluationListener);
				actionListener.loadComposite(this, evaluationComposite);
			}else{
				MultiRoundsPriceComposite evaluationComposite = new MultiRoundsPriceComposite(composite, this, SWT.NONE);
				evaluationComposite.addExpertEvaluationListener(expertEvaluationListener);
				actionListener.loadComposite(this, evaluationComposite);
			}
		}
	}
}
