public function addRessource($sender, $param) { //auf welche dimension sollen die werte zugeordnet werden $rIndecies = $this->ttidtm_ressource->SelectedIndices; foreach ($rIndecies as $index) { $myRecord = new AufgabeRessourceRecord(); $myRecord->idtm_aufgabe = $this->Tedidtm_aufgaben->Text; $myRecord->idtm_ressource = $this->ttidtm_ressource->Items[$index]->Value; $myRecord->auf_res_dauer = $this->ttauf_res_dauer->Text; $myRecord->save(); } $this->bindListRessource(); }
public function addRessource() { if ($this->ttidtm_aufgabe_ressource->Text > 0) { $myRecord = AufgabeRessourceRecord::finder()->findByPK($this->ttidtm_aufgabe_ressource->Text); } else { $myRecord = new AufgabeRessourceRecord(); } $myRecord->idtm_aufgabe = $this->Aedidtm_aufgaben->Text; $myRecord->idtm_ressource = $this->ttidtm_ressource->Text; $myRecord->auf_res_dauer = $this->ttauf_res_dauer->Text; $myRecord->save(); $this->RessourcebindList(); }