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 f�r dieses Dokument $this->finder = ProzessRecord::finder(); $this->MASTERRECORD = new ProzessRecord(); if (!$this->isPostBack) { switch ($this->Request['modus']) { case 0: $sql = "SELECT idta_prozess_type, pro_type_name FROM ta_prozess_type"; $data = PFH::convertdbObjectArray(ProzessTypeRecord::finder()->findAllBySql($sql), array("idta_prozess_type", "pro_type_name")); $this->idta_prozess_type->DataSource = $data; $this->idta_prozess_type->dataBind(); if ($this->Request[$this->primarykey] != 1) { $sql = "SELECT idtm_prozess, pro_name FROM tm_prozess ORDER BY idta_prozess_type"; $data = PFH::convertdbObjectArray(ProzessRecord::finder()->findAllBySql($sql), array("idtm_prozess", "pro_name")); } else { $data = array(); $data[0] = "START"; } $this->parent_idtm_prozess->DataSource = $data; $this->parent_idtm_prozess->dataBind(); break; case 1: $sql = "SELECT idta_prozess_type, pro_type_name FROM ta_prozess_type"; $data = PFH::convertdbObjectArray(ProzessTypeRecord::finder()->findAllBySql($sql), array("idta_prozess_type", "pro_type_name")); $this->edidta_prozess_type->DataSource = $data; $this->edidta_prozess_type->dataBind(); if ($this->Request[$this->primarykey] != 1) { $sql = "SELECT idtm_prozess, pro_name FROM tm_prozess ORDER BY idta_prozess_type"; $data = PFH::convertdbObjectArray(ProzessRecord::finder()->findAllBySql($sql), array("idtm_prozess", "pro_name")); } else { $data = array(); $data[0] = "START"; } $this->edparent_idtm_prozess->DataSource = $data; $this->edparent_idtm_prozess->dataBind(); $this->fillValues($this->getSelected($this->Request[$this->primarykey])); //$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 createZeitPullDown() { //Als erstes die Organisation if ($this->User->getIsAdmin()) { $this->RCedidtm_organisation->Text = ""; } else { $this->RCedidtm_organisation->Text = $this->User->getUserOrgId($this->User->getUserId()); } $this->RCedidta_kosten_status->DataSource = PFH::build_SQLPullDown(KostenStatusRecord::finder(), "ta_kosten_status", array("idta_kosten_status", "kst_status_name")); $this->RCedidta_kosten_status->dataBind(); $PRTREE = new PFHierarchyPullDown(); $PRTREE->setStructureTable("tm_prozess"); $PRTREE->setRecordClass(ProzessRecord::finder()); $PRTREE->setPKField("idtm_prozess"); $PRTREE->setField("pro_name"); $PRTREE->letsrun(); $this->RCedidtm_prozess->DataSource = $PRTREE->myTree; $this->RCedidtm_prozess->dataBind(); $fahrt_status = array(1 => "abbrechenbar", 2 => "ausweisbar", 3 => "privat"); $this->fahrt_status->DataSource = $fahrt_status; $this->fahrt_status->dataBind(); $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(); $this->FFidtm_activity->Text = $this->UserStartId; $this->RCedzeit_date->setDate(date('Y-m-d', time())); // $this->RCedidtm_activity->DataSource=PFH::build_SQLPullDownAdvanced(ActivityRecord::finder(),"tm_activity",array("idtm_activity","act_name","act_pspcode"),"idta_activity_type = 2","act_name ASC"); // $this->RCedidtm_activity->dataBind(); }
public function searchOrg($sender, $param) { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "pro_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_prozess'; $this->OrgListe->VirtualItemCount = count(ProzessRecord::finder()->withprotype()->find($criteria)); $this->OrgListe->DataSource = ProzessRecord::finder()->withprotype()->findAll($criteria); $this->OrgListe->dataBind(); }
public function onLoad($param) { parent::onLoad($param); //Globale definition f�r dieses Dokument $this->finder = ProzessStepRecord::finder(); $this->MASTERRECORD = new ProzessStepRecord(); if (!$this->isPostBack && !$this->isCallback) { switch ($this->Request['modus']) { case 0: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = ProzessStepRecord::finder()->findAllBySql("SELECT idtm_prozess FROM tm_prozess_step WHERE idtm_prozess_step = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(ProzessStepRecord::finder()->findAllBySql("SELECT idtm_prozess_step FROM tm_prozess_step WHERE idtm_prozess = '" . $myPreStepOne[0]->idtm_prozess . "'")); $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_struktur->DataSource = PFH::build_SQLPullDown(StrukturRecord::finder(), "tm_struktur", array("idtm_struktur", "struktur_name")); $this->idtm_struktur->dataBind(); if ($this->Request[$this->primarykey] != 1 and $prozess_counter >= 1) { $sql = "SELECT idtm_prozess_step, prostep_name FROM tm_prozess_step WHERE idtm_prozess = '" . $myPreStepOne[0]->idtm_prozess . "'"; $data = PFH::convertdbObjectArray(ProzessStepRecord::finder()->findAllBySql($sql), array("idtm_prozess_step", "prostep_name")); $data[0] = "START"; } else { $data = array(); $data[0] = "START"; } $this->parent_idtm_prozess_step->DataSource = $data; $this->parent_idtm_prozess_step->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(); if ($this->Request[$this->primarykey] != 1 and $prozess_counter >= 1) { $sql = "SELECT idtm_prozess_step, prostep_name FROM tm_prozess_step WHERE idtm_prozess = '" . $myPreStepOne[0]->idtm_prozess . "'"; $data = PFH::convertdbObjectArray(ProzessStepRecord::finder()->findAllBySql($sql), array("idtm_prozess_step", "prostep_name")); $data[0] = "START"; } else { $data = array(); $data[0] = "START"; } $this->error_idtm_prozess_step->DataSource = $data; $this->error_idtm_prozess_step->dataBind(); break; case 1: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = ProzessStepRecord::finder()->findAllBySql("SELECT idtm_prozess FROM tm_prozess_step WHERE idtm_prozess_step = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(ProzessStepRecord::finder()->findAllBySql("SELECT * FROM tm_prozess_step WHERE idtm_prozess = '" . $myPreStepOne[0]->idtm_prozess . "'")); $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_struktur->DataSource = PFH::build_SQLPullDown(StrukturRecord::finder(), "tm_struktur", array("idtm_struktur", "struktur_name")); $this->edidtm_struktur->dataBind(); $sql = "SELECT idtm_prozess_step, prostep_name FROM tm_prozess_step WHERE idtm_prozess = '" . $myPreStepOne[0]->idtm_prozess . "'"; $data = PFH::convertdbObjectArray(ProzessStepRecord::finder()->findAllBySql($sql), array("idtm_prozess_step", "prostep_name")); $data[0] = "START"; $this->edparent_idtm_prozess_step->DataSource = $data; $this->edparent_idtm_prozess_step->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(); $sql = "SELECT idtm_prozess_step, prostep_name FROM tm_prozess_step WHERE idtm_prozess = '" . $myPreStepOne[0]->idtm_prozess . "'"; $data = PFH::convertdbObjectArray(ProzessStepRecord::finder()->findAllBySql($sql), array("idtm_prozess_step", "prostep_name")); $data[0] = "START"; $this->ederror_idtm_prozess_step->DataSource = $data; $this->ederror_idtm_prozess_step->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->RCedrcv_id->Text = $this->Request[$this->primarykey]; $this->bindListAufgaben(); $this->createRiskPullDown(); $this->bindListRCValue(); break; default: break; } $this->viewPanel->ActiveViewIndex = $this->Request['modus']; } }