Exemplo n.º 1
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();
     }
 }
Exemplo n.º 2
0
 public function initPullDowns()
 {
     $this->ttidtm_ressource->DataSource = PFH::build_SQLPullDown(RessourceRecord::finder(), "tm_ressource", array("idtm_ressource", "res_name"));
     $this->ttidtm_ressource->dataBind();
     $this->Tedidta_aufgaben_type->DataSource = PFH::build_SQLPullDown(AufgabenTypeRecord::finder(), "ta_aufgaben_type", array("idta_aufgaben_type", "auf_type_name"));
     $this->Tedidta_aufgaben_type->dataBind();
 }
Exemplo n.º 3
0
 public function onLoad($param)
 {
     //Globale definition f�r dieses Dokument
     $this->finder = TerminRecord::finder();
     $this->MASTERRECORD = new TerminRecord();
     $this->setUserStartId($this->user->getStartNode($this->user->getUserId($this->user->Name), "tm_activity"));
     date_default_timezone_set('Europe/Berlin');
     parent::onLoad($param);
     if (!$this->isPostBack && !$this->isCallback) {
         $HRKEYTest = new PFHierarchyPullDown();
         $HRKEYTest->setStructureTable("tm_activity");
         $HRKEYTest->setRecordClass(ActivityRecord::finder());
         $HRKEYTest->setPKField("idtm_activity");
         $HRKEYTest->setField("act_name");
         $HRKEYTest->setStartNode($this->UserStartId);
         $HRKEYTest->setSQLCondition("idta_activity_type = 2");
         $HRKEYTest->letsrun();
         $this->FFidtm_activity->DataSource = $HRKEYTest->myTree;
         $this->FFidtm_activity->dataBind();
         $tmpstartdate = new DateTime();
         $this->ter_startdate->setDate($tmpstartdate->format("Y-m-d"));
         $this->ter_enddate->setDate($tmpstartdate->format("Y-m-d"));
         $this->ttidtm_ressource->DataSource = PFH::build_SQLPullDown(RessourceRecord::finder(), "tm_ressource", array("idtm_ressource", "res_name"), "idta_ressource_type>1");
         $this->ttidtm_ressource->dataBind();
         $this->bindListTermin();
     }
 }
 public function initPullDowns()
 {
     $this->CBAufgabeDone->DataSource = $this->auf_done;
     $this->CBAufgabeDone->dataBind();
     $this->ttidtm_ressource->DataSource = PFH::build_SQLPullDown(RessourceRecord::finder(), "tm_ressource", array("idtm_ressource", "res_name"));
     $this->ttidtm_ressource->dataBind();
     $this->Tedidta_aufgaben_type->DataSource = PFH::build_SQLPullDown(AufgabenTypeRecord::finder(), "ta_aufgaben_type", array("idta_aufgaben_type", "auf_type_name"));
     $this->Tedidta_aufgaben_type->dataBind();
     $this->CCAufgabenContainerPageSize->DataSource = array(5 => "5", 10 => "10", 25 => "25", 50 => "50");
     $this->CCAufgabenContainerPageSize->dataBind();
 }
Exemplo n.º 5
0
 public function bindListBelegungsplan()
 {
     $criteria = new TActiveRecordCriteria();
     if ($this->page->isPostBack) {
         $criteria->Condition = "idta_ressource_type = :suchtext1";
         $criteria->Parameters[':suchtext1'] = $this->idta_ressource_type->Text;
     } else {
         $criteria->Condition = "idta_ressource_type = :suchtext1";
         $criteria->Parameters[':suchtext1'] = $this->idta_ressource_type->Text;
     }
     $this->Belegungsplan->DataSource = RessourceRecord::finder()->findAll($criteria);
     $this->Belegungsplan->dataBind();
 }
Exemplo n.º 6
0
 public function RSTSavedButtonClicked($sender, $param)
 {
     $tempus = $this->RSprimarykey;
     if ($this->ressource_edit_status->Text == '1') {
         $AEditRecord = RessourceRecord::finder()->findByPK($this->{$tempus}->Text);
     } else {
         $AEditRecord = new RessourceRecord();
     }
     //HIDDEN
     foreach ($this->RShiddenfields as $recordfield) {
         $edrecordfield = $this->RSPrefix . $recordfield;
         $AEditRecord->{$recordfield} = $this->{$edrecordfield}->Value;
     }
     //DATUM
     foreach ($this->RSdatfields as $recordfield) {
         $edrecordfield = $this->RSPrefix . $recordfield;
         $AEditRecord->{$recordfield} = date('Y-m-d', $this->{$edrecordfield}->TimeStamp);
     }
     //LIST
     foreach ($this->RSlistfields as $recordfield) {
         $edrecordfield = $this->RSPrefix . $recordfield;
         $AEditRecord->{$recordfield} = $this->{$edrecordfield}->Text;
     }
     //BOOL
     foreach ($this->RSboolfields as $recordfield) {
         $edrecordfield = $this->RSPrefix . $recordfield;
         $AEditRecord->{$recordfield} = $this->{$edrecordfield}->Checked ? 1 : 0;
     }
     foreach ($this->RSfields as $recordfield) {
         $edrecordfield = $this->RSPrefix . $recordfield;
         $AEditRecord->{$recordfield} = $this->{$edrecordfield}->Text;
     }
     $AEditRecord->save();
     $this->bindListRessource();
     //$this->ParticipantbindList();
     $this->idtm_ressource->Text = $AEditRecord->idtm_ressource;
 }