function jsaGetDatosEmpresa($dependencia) { //verificar si existe en la BD $Emp = new cEmpresas($dependencia); $idpersona = $Emp->getClaveDePersona(); $Emp->init(); $telefono = $Emp->getTelefono(); $domicilio = $Emp->getDomicilio(); $razon = $Emp->getNombre(); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior('idtelefono', $telefono)); //$tab->add(TabSetValue::getBehavior('iddomiciliodeactividad', $domicilio)); $tab->add(TabSetValue::getBehavior('idrazonsocialtrabajo', $razon)); $xSoc = $Emp->getOPersona(); //$xSoc = new cSocio(); if ($xSoc == null) { } else { $xOBA = $xSoc->getOActividadEconomica(); if ($xOBA != null) { $idactividad = $xOBA->getClaveDeActividad(); $idsector = $xOBA->getClaveDeSector(); $idlocalidad = $xOBA->getClaveDeLocalidad(); $idmunicipio = $xOBA->getClaveDeMunicipio(); $identidadfederativa = $xOBA->getClaveDeEstado(); // idlocalidad idmunicipio identidadfederativa $tab->add(TabSetValue::getBehavior('idactividad', $idactividad)); //$tab->add(TabSetValue::getBehavior('idsectoreconomico', $idsector)); $tab->add(TabSetValue::getBehavior('idlocalidad', $idlocalidad)); $tab->add(TabSetValue::getBehavior('identidadfederativa', $identidadfederativa)); $tab->add(TabSetValue::getBehavior('idmunicipio', $idmunicipio)); $tab->add(TabSetValue::getBehavior('idnombreacceso', $xOBA->getCalle())); $tab->add(TabSetValue::getBehavior('idcodigopostal', $xOBA->getCodigoPostal())); } } //TODO: cargar estado y municiopios return $tab->getString(); }
function setEmpresa($empresa, $puesto, $depto = "", $idempleado = "", $nss = 0, $ExtTelefonica = 0) { //cargar datos de la empresa $this->mClaveEmpresa = $empresa; $this->mPuesto = $puesto; $this->mDepto = $depto; $this->mIDEmpleado = $idempleado; $this->mNSS = $nss; $this->mExtTelefonica = $ExtTelefonica; //iniciar domicilio? $xEmp = new cEmpresas($this->mCodigoPostal); if ($xEmp->init() == true) { $this->mNombreEmpresa = $xEmp->getNombreCorto(); $this->mDomicilio = $xEmp->getDomicilio(); $OPers = $xEmp->getOPersona(); if ($OPers != null) { $xViv = $OPers->getODomicilio(); if ($xViv != null) { $this->mClaveDeEstado = $xViv->getClaveDeEstado(); $this->mClaveDeMunicipio = $xViv->getClaveDeMunicipio(); $this->mClaveDeLocalidad = $xViv->getClaveDeLocalidad(); $this->mNombreDeLocalidad = $xViv->getLocalidad(); $this->mNombreDeMunicipio = $xViv->getMunicipio(); $this->mNombreDeEstado = $xViv->getEstado(); $this->mCodigoPostal = $xViv->getCodigoPostal(); $this->mIDDomicilio = $xViv->getClaveUnica(); } } } }