package nc.ui.wa.ruleex.action;

import nc.ui.hr.uif2.action.AddAction;
import nc.ui.uif2.UIState;
import nc.vo.bd.pub.NODE_TYPE;

/**
 * 
 * @author: xuhw 
 * @date: 2010-4-12 下午01:37:34
 * @since: eHR V6.0
 * @走查人: 
 * @走查日期: 
 * @修改人: 
 * @修改日期: 
 */
public class WaRuleAddAction extends AddAction
{
    @Override
    protected boolean isActionEnable()
    {
		NODE_TYPE node_type = getModel().getContext().getNodeType();
		if (node_type == NODE_TYPE.ORG_NODE && getModel().getContext().getPk_org() == null)
		{
			return false;
		}
        return getModel().getUiState() == UIState.NOT_EDIT;
    }
}
