Exemple #1
0
 function zonificar($id, $departamento, $municipio, $puesto, $dirPuesto, $mesa)
 {
     $daoPV = new DAOPuestoVotacion();
     $daoZ = new DAOZonificacion();
     $idPuesto = $daoPV->consultarPuestoVotacionBD($departamento, $municipio, $puesto, $dirPuesto, $mesa);
     if ($idPuesto != NULL) {
         return $daoZ->agregarZonificacion($id, $idPuesto);
     } else {
         $daoPV->agregarPuestoVotacion($departamento, $municipio, $puesto, $dirPuesto, $mesa);
         zonificar($id, $departamento, $municipio, $puesto, $dirPuesto, $mesa);
         return true;
     }
     return FALSE;
 }
Exemple #2
0
 public function buscarPuestoVotacion($cedula)
 {
     $lista = $this->puestoVotacion($cedula);
     $daopuesto = new DAOPuestoVotacion();
     $puesto1 = new PuestoVotacion(NULL, NULL, NULL, NULL, NULL, NULL);
     if ($lista['ERROR'] == NULL) {
         $puestoreg = $daopuesto->agregarPuestoVotacion($lista['DEPARTAMENTO'], $lista['MUNICIPIO'], $lista['PUESTO'], $lista['DIRECCION'], $lista['MESA']);
         return $puestoreg;
     } else {
         $puesto1->SetDepartamento($lista['ERROR']);
         return $puesto1;
     }
 }