Пример #1
0
 public function TASavedButtonClicked($sender, $param)
 {
     $tempus = 'Ted' . $this->RCprimarykey;
     if ($this->Tedaufgaben_edit_status->Text == '1') {
         $RCEditRecord = AufgabenRecord::finder()->findByPK($this->{$tempus}->Text);
     } else {
         $RCEditRecord = new AufgabenRecord();
     }
     //HIDDEN
     foreach ($this->RChiddenfields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Value;
     }
     //DATUM
     foreach ($this->RCdatfields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = date('Y-m-d', $this->{$edrecordfield}->TimeStamp);
     }
     //BOOL
     foreach ($this->RCboolfields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Checked ? 1 : 0;
     }
     foreach ($this->RCtimefields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Text;
     }
     foreach ($this->RCfields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Text;
     }
     $RCEditRecord->save();
     $this->bindListTAValue();
 }
Пример #2
0
 public function addNewDetailGroup($sender, $param)
 {
     $newprtdetRecord = new ProtokollDetailRecord();
     $newprtdetRecord->idtm_protokoll_detail_group = $param->CallbackParameter;
     $newprtdetRecord->idta_protokoll_ergebnistype = 3;
     $newprtdetRecord->idtm_protokoll = $this->edidtm_protokoll->Data;
     $CheckStart = TerminRecord::finder()->findByPK($this->page->edidtm_termin->Text)->idtm_activity;
     if ($CheckStart > 0) {
         $newprtdetRecord->idtm_activity = $CheckStart;
     } else {
         $newprtdetRecord->idtm_activity = ActivityRecord::finder()->findByparent_idtm_activity(0)->idtm_activity;
     }
     $newprtdetRecord->prtdet_wvl = 0;
     $newprtdetRecord->save();
     $newaufgabenRecord = new AufgabenRecord();
     $newaufgabenRecord->auf_id = $newprtdetRecord->idtm_protokoll_detail;
     $newaufgabenRecord->auf_tabelle = 'tm_protokoll_detail';
     $newaufgabenRecord->auf_name = 'Protokollpunkt';
     $newaufgabenRecord->idtm_organisation = 1;
     $newaufgabenRecord->auf_deleted = 0;
     $newaufgabenRecord->save();
     $this->load_prtdetailsgroup();
 }
Пример #3
0
 public function importTASK($data)
 {
     $Aufgabe = new AufgabenRecord();
     $Aufgabe->auf_tdate = $data[0];
     $Aufgabe->auf_cdate = date($data[0]);
     $Aufgabe->auf_tag = $data[3];
     $Aufgabe->auf_name = 'AC Imp';
     $Aufgabe->auf_zeichen_eigen = utf8_encode($data[7]);
     $Aufgabe->auf_zeichen_fremd = '';
     $Aufgabe->idta_aufgaben_type = 1;
     $Aufgabe->idtm_organisation = $this->responsible_idtm_organisation->Text;
     $Aufgabe->auf_tabelle = "tm_organisation";
     if ($data[2] * 1 < 1000) {
         $data[2] = '0' . $data[2];
     }
     $Organisation = OrganisationRecord::finder()->findByorg_fk_internal('0' . trim($data[2]));
     if (count($Organisation) == 1) {
         $Aufgabe->auf_id = $Organisation->idtm_organisation;
     } else {
         $Aufgabe->auf_id = $this->responsible_idtm_organisation->Text;
     }
     $Aufgabe->auf_done = $data[6];
     if ($data[5] != '') {
         $Aufgabe->auf_ddate = $data[5];
     } else {
         $Aufgabe->auf_ddate = $data[0];
     }
     $html_string = "<b>" . utf8_encode($data[8]) . "</b><br/>";
     $html_string .= utf8_encode($data[9]) . "<br/>";
     $html_string .= "<b>" . utf8_encode($data[10]) . "</b><br/>";
     $html_string .= utf8_encode($data[11]);
     $Aufgabe->auf_beschreibung = $html_string;
     $Aufgabe->save();
     unset($Aufgabe, $Organisation);
 }
 public function TASavedButtonClicked($sender, $param)
 {
     $tempus = 'Ted' . $this->RCprimarykey;
     if ($this->Tedaufgaben_edit_status->Text == '1') {
         $RCEditRecord = AufgabenRecord::finder()->findByPK($this->{$tempus}->Text);
     } else {
         $RCEditRecord = new AufgabenRecord();
     }
     //HIDDEN
     foreach ($this->RChiddenfields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Value;
     }
     //DATUM
     foreach ($this->RCdatfields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = date('Y-m-d', $this->{$edrecordfield}->TimeStamp);
     }
     //BOOL
     foreach ($this->RCboolfields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Checked ? 1 : 0;
     }
     foreach ($this->RCtimefields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Text;
     }
     foreach ($this->RCfields as $recordfield) {
         $edrecordfield = 'Ted' . $recordfield;
         $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Text;
     }
     $RCEditRecord->save();
     $this->bindListTAValue();
     $this->panelNewTask->setDisplay("None");
     //$this->page->getCallbackClient()->click($this->page->AufgabenContainerOrganisation->TaskOverview->getClientID()."_0");
     //$this->page->AufgabenContainerOrganisation->TaskTabs->ActiveViewIndex="0";
 }