public function onLoad($param) { parent::onLoad($param); date_default_timezone_set('Europe/Berlin'); if (!$this->IsPostBack || !$this->IsCallBack) { $sql = "SELECT idta_organisation_type, org_type_name FROM ta_organisation_type"; $data = PFH::convertdbObjectArray(OrganisationTypeRecord::finder()->findAllBySql($sql), array("idta_organisation_type", "org_type_name")); $this->RCedidta_organisation_type->DataSource = $data; $this->RCedidta_organisation_type->dataBind(); $this->RCedidta_organisation_art->DataSource = $this->idta_organisation_art; $this->RCedidta_organisation_art->dataBind(); $this->RCedorg_idtm_user_role->DataSource = PFH::build_SQLPullDown(UserRoleRecord::finder(), "tm_user_role", array("idtm_user_role", "user_role_name")); $this->RCedorg_idtm_user_role->dataBind(); $this->RCedidta_branche->DataSource = PFH::build_SQLPullDown(BrancheRecord::finder(), "ta_branche", array("idta_branche", "bra_name")); $this->RCedidta_branche->dataBind(); $this->RCedidtm_ressource->DataSource = PFH::build_SQLPullDown(RessourceRecord::finder(), "tm_ressource", array("idtm_ressource", "res_name")); $this->RCedidtm_ressource->dataBind(); $this->RCedidtm_country->DataSource = PFH::build_SQLPullDown(CountryRecord::finder(), "tm_country", array("idtm_country", "country_iso")); $this->RCedidtm_country->dataBind(); $this->RCedkom_type->DataSource = array(1 => "Telefon", "Fax", "Mail"); $this->RCedkom_type->dataBind(); $this->RCedorg_status->DataSource = array(0 => "offen", "interessant", "nicht interessant", "Kunde", "EX-Kunde"); $this->RCedorg_status->dataBind(); if (isset($_GET['idtm_organisation'])) { $this->view_Organisation($_GET['idtm_organisation']); } else { $this->view_Organisation(1); } //$this->bindListOrgListe(); } }
public function onPreInit($param) { parent::onPreInit($param); $docname = "tempXML"; $ext = "xml"; $header = "application/xml"; $doc = new TXmlDocument('1.0', 'ISO-8859-1'); $doc->TagName = 'menu'; $doc->setAttribute('id', "0"); $QVFile = new TXmlElement('item'); $QVFile->setAttribute('id', "new_Element"); $QVFile->setAttribute('img', "plus5.gif"); $QVFile->setAttribute('text', "new element"); $StrukturElements = OrganisationTypeRecord::finder()->findAll(); foreach ($StrukturElements as $Strukturtype) { $ST = new TXmlElement('item'); $ST->setAttribute('id', $Strukturtype->idta_organisation_type); $ST->setAttribute('img', 'org' . $Strukturtype->idta_organisation_type . ".gif"); $ST->setAttribute('text', utf8_encode($Strukturtype->org_type_name)); //hier muss die logik fuer die basiswerte aus den dimensionen hin... //hier hole ich mir die Dimensionsgruppen $QVFile->Elements[] = $ST; } $doc->Elements[] = $QVFile; $CMdelete = new TXmlElement('item'); $CMdelete->setAttribute('id', "delete_Element"); $CMdelete->setAttribute('img', "minus.gif"); $CMdelete->setAttribute('text', "delete element"); $doc->Elements[] = $CMdelete; $this->getResponse()->appendHeader("Content-Type:" . $header); $this->getResponse()->appendHeader("Content-Disposition:inline;filename=" . $docName . '.' . $ext); $doc->saveToFile('php://output'); exit; }
public function initPullDown() { $sql = "SELECT idta_organisation_type, org_type_name FROM ta_organisation_type ORDER BY org_type_name"; $data = PFH::convertdbObjectArray(OrganisationTypeRecord::finder()->findAllBySql($sql), array("idta_organisation_type", "org_type_name")); $data[-1] = "alle"; $this->WINOrgaidta_organisation_type->DataSource = $data; $this->WINOrgaidta_organisation_type->dataBind(); }
public static function initOrganisationStruktur() { $OrganisationType = OrganisationTypeRecord::finder()->findAll(); if (count($OrganisationType) >= 1) { foreach ($OrganisationType as $OrgType) { $Organisation = OrganisationRecord::finder()->findByorg_fk_internal($OrgType->org_type_name); if (count($Organisation) != 1) { $Organisation = new OrganisationRecord(); } $Organisation->idta_organisation_type = 1; $Organisation->idta_organisation_art = 1; $Organisation->idtm_ressource = 1; $Organisation->org_name = $OrgType->org_type_name; $Organisation->org_fk_internal = $OrgType->org_type_name; $Organisation->parent_idtm_organisation = 1; $Organisation->save(); /*foreach(range('A','Z') as $i){ $OrgChild = OrganisationRecord::finder()->findByorg_fk_internal($OrgType->org_type_name.$i); if(count($OrgChild)!=1){ $OrgChild = new OrganisationRecord(); } $OrgChild->idta_organisation_type = 1; $OrgChild->idta_organisation_art = 1; $OrgChild->idtm_ressource = 1; $OrgChild->org_name = $i; $OrgChild->org_fk_internal = $OrgType->org_type_name.$i; $OrgChild->parent_idtm_organisation = $Organisation->idtm_organisation; $OrgChild->save(); }*/ unset($Organisation); } } }