package com.gx.obe.management.composite;

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;

import com.gx.obe.evaluation.step.entity.BusinessParam.BasePriceCalculation;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;

/**
 * @Description: 基准价管理器
 * @author chenxw
 */
public class BasePriceManager extends Composite {
	
	protected TenderProjectEntity tenderProject;
	protected TenderProjectRuleEntity projectRule;
	protected BasePriceCalculation basePriceCalculation;
	
	public BasePriceManager(Composite parent, int style) {
		super(parent, style);
		setLayout(new GridLayout(1, false));
	}
	
	/**
	 * @Description: 刷新
	 * @author chenxw
	 * @param basePriceCalculation
	 */
	public void refresh(TenderProjectEntity tenderProject, TenderProjectRuleEntity projectRule, BasePriceCalculation basePriceCalculation) {
		this.tenderProject = tenderProject;
		this.projectRule = projectRule;
		this.basePriceCalculation = basePriceCalculation;
		refresh();
	}
	
	protected void refresh() {}
	
	/**
	 * @Description: 保存
	 * @author chenxw
	 * @param basePriceCalculation
	 * @return
	 */
	public boolean save() {
		return true;
	}
	
	/**
	 * @Description: 获取公式内容
	 * @author chenxw
	 * @return
	 */
	public String getFormulaContent() {
		return null;
	}
	
	protected void checkSubclass() {}
	
}
