Example #1
0
 public function onInit($param)
 {
     parent::onInit($param);
     if (!$this->isPostBack) {
         switch ($this->Request['modus']) {
             case 0:
                 $sql = "SELECT idtm_country, country_ful FROM tm_country";
                 $data = PFH::convertdbObjectArray(CountryRecord::finder()->findAllBySql($sql), array("idtm_country", "country_ful"));
                 $this->Country->DataSource = $data;
                 $this->Country->dataBind();
                 $this->idta_partei->Data = $this->Request['idta_partei'];
                 break;
             case 1:
                 $sql = "SELECT idtm_country, country_ful FROM tm_country";
                 $data = PFH::convertdbObjectArray(CountryRecord::finder()->findAllBySql($sql), array("idtm_country", "country_ful"));
                 $this->edCountry->DataSource = $data;
                 $this->edCountry->dataBind();
                 $this->fillValues($this->getSelected($this->Request['idta_adresse']));
                 break;
             default:
                 break;
         }
         $this->viewPanel->ActiveViewIndex = $this->Request['modus'];
     }
 }
Example #2
0
 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();
     }
 }