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(); }