public function bindList() { $SQL1 = "SELECT ta_adresse.idta_adresse FROM ta_adresse INNER JOIN ta_partei_has_ta_adresse ON ta_adresse.idta_adresse = ta_partei_has_ta_adresse.idta_adresse INNER JOIN ta_partei ON ta_partei_has_ta_adresse.idta_partei = ta_partei.idta_partei WHERE ta_partei.idtm_user = "******"idta_adresse = '0'"; } $criteria->Condition = $myCondition; $criteria->setLimit($this->RepeaterWaren->PageSize); $criteria->setOffset($this->RepeaterWaren->PageSize * $this->RepeaterWaren->CurrentPageIndex); if (is_Object(WarenRecord::finder()->find($criteria))) { $this->RepeaterWaren->VirtualItemCount = WarenRecord::finder()->find($criteria)->count(); } $this->RepeaterWaren->DataSource = WarenRecord::finder()->findAll($criteria); $this->RepeaterWaren->DataBind(); }
public function insertButtonClicked($sender, $param) { $warenRecord = new WarenRecord(); $fields = array("waren_artikelnummer", "waren_ean", "waren_bezeichnung", "waren_beschreibung", "waren_menge", "waren_gewicht", "waren_preis", "waren_typ", "idtm_waren_kategorie", "idtm_preis_kategorie", "idta_adresse"); //ACHTUNG DATUM $warenRecord->waren_dat_lb = date("Y-m-d", $this->waren_dat_lb->TimeStamp); foreach ($fields as $recordfield) { $warenRecord->{$recordfield} = $this->{$recordfield}->Text; } $warenRecord->save(); $this->Response->redirect($this->getRequest()->constructUrl('page', "logik.partei")); }
protected function getSelected($key) { $item = WarenRecord::finder()->withwarenadresse()->findByPk($key); return $item; }