public function onLoad($param) { parent::onLoad($param); //Globale definition f�r dieses Dokument $this->finder = TTZieleRecord::finder(); $this->MASTERRECORD = new TTZieleRecord(); if (!$this->isPostBack && !$this->isCallback) { switch ($this->Request['modus']) { case 0: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = TTZieleRecord::finder()->findAllBySql("SELECT idtm_prozess FROM tt_ziele WHERE idtt_ziele = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(TTZieleRecord::finder()->findAllBySql("SELECT idtt_ziele FROM tt_ziele WHERE idtm_ziele = '" . $myPreStepOne[0]->idtm_ziele . "'")); $this->idtm_prozess->DataSource = PFH::build_SQLPullDown(ProzessRecord::finder(), "tm_prozess", array("idtm_prozess", "pro_name"), "idta_prozess_type = 3"); $this->idtm_prozess->dataBind(); $HRKEYTest = new PFHierarchyPullDown(); $HRKEYTest->setStructureTable("tm_ziele"); $HRKEYTest->setRecordClass(ZieleRecord::finder()); $HRKEYTest->setPKField("idtm_ziele"); $HRKEYTest->setField("zie_name"); $HRKEYTest->setSQLCondition("idta_ziele_type = 3 OR idta_ziele_type=1 OR idta_ziele_type=2"); $HRKEYTest->letsrun(); $this->idtm_ziele->DataSource = $HRKEYTest->myTree; $this->idtm_ziele->dataBind(); $sql = "SELECT idtm_organisation, org_name FROM tm_organisation WHERE idta_organisation_type = 4"; $data = PFH::convertdbObjectArray(OrganisationRecord::finder()->findAllBySql($sql), array("idtm_organisation", "org_name")); $this->idtm_organisation->DataSource = $data; $this->idtm_organisation->dataBind(); break; case 1: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = TTZieleRecord::finder()->findAllBySql("SELECT idtm_ziele FROM tt_ziele WHERE idtt_ziele = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(TTZieleRecord::finder()->findAllBySql("SELECT * FROM tt_ziele WHERE idtm_ziele = '" . $myPreStepOne[0]->idtm_ziele . "'")); $this->edidtm_prozess->DataSource = PFH::build_SQLPullDown(ProzessRecord::finder(), "tm_prozess", array("idtm_prozess", "pro_name"), "idta_prozess_type = 3"); $this->edidtm_prozess->dataBind(); $this->edidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type=4"); $this->edidtm_organisation->dataBind(); $HRKEYTest = new PFHierarchyPullDown(); $HRKEYTest->setStructureTable("tm_ziele"); $HRKEYTest->setRecordClass(ZieleRecord::finder()); $HRKEYTest->setPKField("idtm_ziele"); $HRKEYTest->setField("zie_name"); $HRKEYTest->setSQLCondition("idta_ziele_type = 3 OR idta_ziele_type=1 OR idta_ziele_type=2"); $HRKEYTest->letsrun(); $this->edidtm_ziele->DataSource = $HRKEYTest->myTree; $this->edidtm_ziele->dataBind(); $this->fillValues($this->getSelected($this->Request[$this->primarykey])); $this->Tedauf_id->Text = $this->Request[$this->primarykey]; //the parameters for the RiskValueContainer $this->RiskValueContainer->RCedrcv_tabelle->Text = "tt_ziele"; $this->RiskValueContainer->RCedrcv_id->Text = $this->Request[$this->primarykey]; break; default: break; } $this->viewPanel->ActiveViewIndex = $this->Request['modus']; } }
public function onInit($param) { parent::onInit($param); //Globale definition fuer dieses Dokument $this->finder = ZieleRecord::finder(); $this->MASTERRECORD = new ZieleRecord(); if (!$this->isPostBack) { switch ($this->Request['modus']) { case 0: $sql = "SELECT idta_ziele_type, zie_type_name FROM ta_ziele_type"; $data = PFH::convertdbObjectArray(ZieleTypeRecord::finder()->findAllBySql($sql), array("idta_ziele_type", "zie_type_name")); $this->idta_ziele_type->DataSource = $data; $this->idta_ziele_type->dataBind(); $HRKEYTest = new PFHierarchyPullDown(); $HRKEYTest->setStructureTable("tm_ziele"); $HRKEYTest->setRecordClass(ZieleRecord::finder()); $HRKEYTest->setPKField("idtm_ziele"); $HRKEYTest->setField("zie_name"); $HRKEYTest->letsrun(); $this->parent_idtm_ziele->DataSource = $HRKEYTest->myTree; $this->parent_idtm_ziele->dataBind(); $this->idtm_activity->DataSource = PFH::build_SQLPullDownAdvanced(ActivityRecord::finder(), "tm_activity", array("idtm_activity", "act_pspcode", "act_name"), "idta_activity_type = 2"); $this->idtm_activity->dataBind(); break; case 1: $sql = "SELECT idta_ziele_type, zie_type_name FROM ta_ziele_type"; $data = PFH::convertdbObjectArray(ZieleTypeRecord::finder()->findAllBySql($sql), array("idta_ziele_type", "zie_type_name")); $this->edidta_ziele_type->DataSource = $data; $this->edidta_ziele_type->dataBind(); $HRKEYTest = new PFHierarchyPullDown(); $HRKEYTest->setStructureTable("tm_ziele"); $HRKEYTest->setRecordClass(ZieleRecord::finder()); $HRKEYTest->setPKField("idtm_ziele"); $HRKEYTest->setField("zie_name"); $HRKEYTest->letsrun(); $this->edparent_idtm_ziele->DataSource = $HRKEYTest->myTree; $this->edparent_idtm_ziele->dataBind(); $this->fillValues($this->getSelected($this->Request[$this->primarykey])); $this->edidtm_activity->DataSource = PFH::build_SQLPullDownAdvanced(ActivityRecord::finder(), "tm_activity", array("idtm_activity", "act_pspcode", "act_name"), "idta_activity_type = 2"); $this->edidtm_activity->dataBind(); //$this->bindListed(); break; default: break; } $this->viewPanel->ActiveViewIndex = $this->Request['modus']; } }
public function onLoad($param) { parent::onLoad($param); //Globale definition f�r dieses Dokument $this->finder = TTZieleRecord::finder(); $this->MASTERRECORD = new TTZieleRecord(); if (!$this->isPostBack && !$this->isCallback) { switch ($this->Request['modus']) { case 0: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = TTZieleRecord::finder()->findAllBySql("SELECT idtm_prozess FROM tt_ziele WHERE idtt_ziele = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(TTZieleRecord::finder()->findAllBySql("SELECT idtt_ziele FROM tt_ziele WHERE idtm_ziele = '" . $myPreStepOne[0]->idtm_ziele . "'")); $this->idtm_prozess->DataSource = PFH::build_SQLPullDown(ProzessRecord::finder(), "tm_prozess", array("idtm_prozess", "pro_name"), "idta_prozess_type = 3"); $this->idtm_prozess->dataBind(); $this->idtm_ziele->DataSource = PFH::build_SQLPullDown(ZieleRecord::finder(), "tm_ziele", array("idtm_ziele", "zie_name"), "(idta_ziele_type = 1 OR idta_ziele_type = 3)"); $this->idtm_ziele->dataBind(); $sql = "SELECT idtm_organisation, org_name FROM tm_organisation WHERE idta_organisation_type = 4"; $data = PFH::convertdbObjectArray(OrganisationRecord::finder()->findAllBySql($sql), array("idtm_organisation", "org_name")); $this->idtm_organisation->DataSource = $data; $this->idtm_organisation->dataBind(); break; case 1: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = TTZieleRecord::finder()->findAllBySql("SELECT idtm_ziele FROM tt_ziele WHERE idtt_ziele = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(TTZieleRecord::finder()->findAllBySql("SELECT * FROM tt_ziele WHERE idtm_ziele = '" . $myPreStepOne[0]->idtm_ziele . "'")); $this->edidtm_prozess->DataSource = PFH::build_SQLPullDown(ProzessRecord::finder(), "tm_prozess", array("idtm_prozess", "pro_name"), "idta_prozess_type = 3"); $this->edidtm_prozess->dataBind(); $this->edidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type=4"); $this->edidtm_organisation->dataBind(); $this->edidtm_ziele->DataSource = PFH::build_SQLPullDown(ZieleRecord::finder(), "tm_ziele", array("idtm_ziele", "zie_name"), "(idta_ziele_type = 1 OR idta_ziele_type = 3)"); $this->edidtm_ziele->dataBind(); $this->Aedidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type=4"); $this->Aedidtm_organisation->dataBind(); $this->fillValues($this->getSelected($this->Request[$this->primarykey])); $this->Aedauf_id->Text = $this->Request[$this->primarykey]; $this->bindListAufgaben(); break; default: break; } $this->viewPanel->ActiveViewIndex = $this->Request['modus']; } }
public function bindRepeaterZiele3($sender, $param) { $item = $param->Item; if ($item->ItemType === 'Item' || $item->ItemType === 'AlternatingItem') { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "idta_ziele_type = :suchtext1 AND parent_idtm_ziele = :suchtext2"; $criteria->Parameters[':suchtext1'] = 3; $criteria->Parameters[':suchtext2'] = $item->Data->idtm_ziele; $item->RepZiele3->DataSource = ZieleRecord::finder()->findAll($criteria); $item->RepZiele3->dataBind(); } }
public function searchOrg($sender, $param) { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "zie_name LIKE :suchtext"; $criteria->Parameters[':suchtext'] = "%" . $this->find_org->Text . "%"; $criteria->setLimit($this->OrgListe->PageSize); $criteria->setOffset($this->OrgListe->PageSize * $this->OrgListe->CurrentPageIndex); $this->OrgListe->DataKeyField = 'idtm_ziele'; $this->OrgListe->VirtualItemCount = count(ZieleRecord::finder()->withzieletype()->find($criteria)); $this->OrgListe->DataSource = ZieleRecord::finder()->withzieletype()->findAll($criteria); $this->OrgListe->dataBind(); }