public function searchOrg($sender, $param) { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "pivot_bericht_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 = 'idta_pivot_bericht'; $this->OrgListe->VirtualItemCount = count(PivotBerichtRecord::finder()->find($criteria)); $this->OrgListe->DataSource = PivotBerichtRecord::finder()->findAll($criteria); $this->OrgListe->dataBind(); }
public function onLoad($param) { parent::onLoad($param); if ($this->Request['periode'] != '') { $this->Periode = $this->Request['periode']; } if (!$this->isPostBack && !$this->isCallback) { $this->DWH_idta_perioden->DataSource = PFH::build_SQLPullDown(PeriodenRecord::finder(), "ta_perioden", array("per_intern", "per_extern")); $this->DWH_idta_perioden->dataBind(); $this->DWH_idta_perioden->Text = $this->Periode; $this->idta_pivot_bericht->Text = $this->Request['idta_pivot_bericht']; $this->PivotBerichtRecord = PivotBerichtRecord::finder()->findByPK($this->Request['idta_pivot_bericht']); $this->pivot_bericht_name->Text = $this->PivotBerichtRecord->pivot_bericht_name; //hier berechne ich die Anzahl der Elemente auf der untersten Ebene if (count(PivotRecord::finder()->findByidta_pivot_bericht($this->PivotBerichtRecord->idta_pivot_bericht)) > 0) { $this->calc_NumberOfElements(PivotRecord::finder()->findByidta_pivot_bericht($this->PivotBerichtRecord->idta_pivot_bericht)); $this->calc_NumerOfAllElements(); $this->buildPivotReport(); //$this->generateGraph($this->zwischenergebnisse); } } }
public function PBSavedButtonClicked($sender, $param) { $tempus = 'PBed' . $this->PBprimarykey; if ($this->PBedpivotbericht_edit_status->Text == '1') { $PBEditRecord = PivotBerichtRecord::finder()->findByPK($this->{$tempus}->Text); } else { $PBEditRecord = new PivotBerichtRecord(); } //HIDDEN foreach ($this->PBhiddenfields as $recordfield) { $edrecordfield = 'PBed' . $recordfield; $PBEditRecord->{$recordfield} = $this->{$edrecordfield}->Value; } //DATUM foreach ($this->PBdatfields as $recordfield) { $edrecordfield = 'PBed' . $recordfield; $PBEditRecord->{$recordfield} = date('Y-m-d', $this->{$edrecordfield}->TimeStamp); } //BOOL foreach ($this->PBboolfields as $recordfield) { $edrecordfield = 'PBed' . $recordfield; $PBEditRecord->{$recordfield} = $this->{$edrecordfield}->Checked ? 1 : 0; } foreach ($this->PBfields as $recordfield) { $edrecordfield = 'PBed' . $recordfield; $PBEditRecord->{$recordfield} = $this->{$edrecordfield}->Text; } $PBEditRecord->save(); $this->bindListPivotBerichtValue(); }