コード例 #1
0
    $usuarios->SetCampo('resp_ipi', $consulta->resp_ipi);
    $usuarios->SetCampo('resp_ipva', $consulta->resp_ipva);
}
/* * *****************************************************************************
 * Preenche o Parao do funcionario que esta no model
 * ***************************************************************************** */
$dados['form']['nome'] = $usuarios->GetNome();
$dados['form']['email'] = $usuarios->GetEmail();
$dados['form']['status'] = $usuarios->GetStatus();
$dados['form']['cpf'] = $usuarios->GetCpf();
$dados['form']['tipo_usurio'] = $usuarios->GetTipoUsuarios();
$dados['form']['resp_cnh'] = $usuarios->GetRespCnh();
$dados['form']['resp_rodizio'] = $usuarios->GetRespRodizios();
$dados['form']['resp_defis'] = $usuarios->GetRespDefis();
$dados['form']['resp_icms'] = $usuarios->GetRespIcms();
$dados['form']['resp_ipi'] = $usuarios->GetRespIpi();
$dados['form']['resp_ipva'] = $usuarios->GetRespIpva();
$dados['form']['resp_laudos'] = $usuarios->GetRespLaudos();
/* * *****************************************************************************
 * VALIDA OS CAMPOS
 * ***************************************************************************** */
$this->form_validation->set_message('required', '%s, Por favor o campo não pode ser vazio');
$this->form_validation->set_message('valid_email', '%s, esta com erro!');
foreach ($usuarios->CamposObrigatorios() as $key => $value) {
    $this->form_validation->set_rules($value[0], $value[1], $value[2]);
}
/* * *****************************************************************************
 * Buscas todos os registros
 * ***************************************************************************** */
$banco->SetCampos("*");
$banco->SetTabelas("usuarios");