function LimCombustivel(objCtrCombustivel) {

	this.setId("CtrCombustivel");
	this.setIdFormulario("formCombustivel");
	this.setLargura(450);
	this.setAltura(250);	
	this.setTitulo("Combust&iacute;vel");
	this.setHtml("departamento/veiculos/cad_combustivel.html");
	this.setIdFoco("idCampoNome");
	
	this.setControlador(objCtrCombustivel);
	
	// EVENTOS
	this.pesquisaCombustivel = function() {
		this.getControlador().pesquisaCombustivel();
	}

	this.botaoNovo = function() {
		this.limpaHtml();
	}
	
	this.botaoSalvar = function() {
		var codigo = Number(this.getCampoCodigoCombustivel());
		
		if (this.verificaCamposObrigatorios()) {
			if (codigo > 0) {
				this.getControlador().altera(codigo);
			} else {
				this.getControlador().salva();	
			}
		} 
	}
	// METODOS 	
	
	this.limpaHtml = function() {
		$(this.getIdFormulario()).reset();
	} 
	
	// GETS E SETS
	this.getCampoCodigoCombustivel = function() {
		return $(this.getIdFormulario()).idCampoCodigoCombustivel.value;
	}

	this.setCampoCodigoCombustivel = function(valor) {
		$(this.getIdFormulario()).idCampoCodigoCombustivel.value = valor;
	}

	this.getRadioSituacao = function() {
		return ($(this.getIdFormulario()).ativoRadio[0].checked == true) ? true : false;
	}
	
	this.setRadioSituacao = function(valor) {
		if (valor == true) {
			$(this.getIdFormulario()).ativoRadio[0].checked = true;
		} else {
			$(this.getIdFormulario()).ativoRadio[1].checked = true;
		}
	}

	this.getCampoNome = function() {
		return $(this.getIdFormulario()).idCampoNome.value;
	}

	this.setCampoNome = function(valor) {
		$(this.getIdFormulario()).idCampoNome.value = valor;
	}

	this.getCampoUnidade = function() {
		return $(this.getIdFormulario()).idCampoUnidade.value;
	}

	this.setCampoUnidade = function(valor) {
		$(this.getIdFormulario()).idCampoUnidade.value = valor;
	}

	this.getCampoCusto = function() {
		return $(this.getIdFormulario()).idCampoCusto.value;
	}

	this.setCampoCusto = function(valor) {
		$(this.getIdFormulario()).idCampoCusto.value = valor;
	}

	this.posCarregamento = function() {
		this.colocaFoco();
		this.getControlador().inicializa();
	}
	
		
}
LimCombustivel.prototype = new Limite;