package nc.ui.wa.ruleex.model;

import nc.bs.framework.common.NCLocator;
import nc.bs.logging.Logger;
import nc.itf.hr.wa.IWaRuleExQueryService;
import nc.ui.uif2.model.DefaultAppModelDataManager;
import nc.ui.uif2.model.IAppModelDataManagerEx;
import nc.vo.hrwa.waruleex.AggWageformExVO;
import nc.vo.pub.BusinessException;
import nc.vo.pub.BusinessRuntimeException;

/**
 * WaRuleDataManager<BR>
 * <BR>
 * 
 * @author: xuhw
 * @date: 2009-11-10
 * @since: eHR V6.0
 * @走查人:
 * @走查日期:
 * @修改人:
 * @修改日期:
 */
public class WaRuleDataManager extends DefaultAppModelDataManager implements
		IAppModelDataManagerEx
{
	@Override
	public void initModel()
	{
		AggWageformExVO[] vos = null;
		try
		{
			vos = (AggWageformExVO[])NCLocator.getInstance().lookup(IWaRuleExQueryService.class).queryWageFormVO(this.getContext(), null);
			getModel().initModel(vos);
		}
		catch (BusinessException e)
		{
			Logger.error(e.getMessage(), e);
			throw new BusinessRuntimeException(e.getMessage(), e);
		}
	}

	/**
	 * @author xuhw on 2009-11-10
	 */
	@Override
	public void initModelBySqlWhere(String sqlWhere)
	{
		refresh();
	}

	/**
	 * 刷新界面
	 * @author xuhw on 2009-11-10
	 */
	@Override
	public void refresh()
	{
		initModel();
	}

	/**
	 * @author xuhw on 2009-11-17
	 */
	@Override
	public void setShowSealDataFlag(boolean showSealDataFlag)
	{
	}
}
