Ejemplo n.º 1
0
 public function createRiskPullDown()
 {
     //risiko oder chance
     $data = array(0 => "Risiko", 1 => "Chance");
     $this->RCedrcv_type->DataSource = $data;
     $this->RCedrcv_type->DataBind();
     //die Risikoklasse
     $this->RCedidtm_risiko->DataSource = PFH::build_SQLPullDown(RisikoRecord::finder(), "tm_risiko", array("idtm_risiko", "ris_name"));
     $this->RCedidtm_risiko->dataBind();
 }
Ejemplo n.º 2
0
 public function searchOrg($sender, $param)
 {
     $criteria = new TActiveRecordCriteria();
     $criteria->Condition = "ris_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_risiko';
     $this->OrgListe->VirtualItemCount = count(RisikoRecord::finder()->withristype()->find($criteria));
     $this->OrgListe->DataSource = RisikoRecord::finder()->withristype()->findAll($criteria);
     $this->OrgListe->dataBind();
 }
Ejemplo n.º 3
0
 public function bindRepeater2($sender, $param)
 {
     $item = $param->Item;
     $this->bindRepeater4($sender, $param);
     if ($item->ItemType === 'Item' || $item->ItemType === 'AlternatingItem') {
         $criteria = new TActiveRecordCriteria();
         $criteria->Condition = "parent_idtm_risiko = :suchtext1 AND idta_risiko_type = :suchtext2";
         $criteria->Parameters[':suchtext1'] = $item->Data->idtm_risiko;
         $criteria->Parameters[':suchtext2'] = 2;
         $item->Repeater2->DataSource = RisikoRecord::finder()->findAll($criteria);
         $item->Repeater2->dataBind();
     }
 }
Ejemplo n.º 4
0
 public function onInit($param)
 {
     parent::onInit($param);
     //Globale definition f�r dieses Dokument
     $this->finder = RisikoRecord::finder();
     $this->MASTERRECORD = new RisikoRecord();
     if (!$this->isPostBack) {
         switch ($this->Request['modus']) {
             case 0:
                 $sql = "SELECT idta_risiko_type, ris_type_name FROM ta_risiko_type";
                 $data = PFH::convertdbObjectArray(RisikoTypeRecord::finder()->findAllBySql($sql), array("idta_risiko_type", "ris_type_name"));
                 $this->idta_risiko_type->DataSource = $data;
                 $this->idta_risiko_type->dataBind();
                 if ($this->Request[$this->primarykey] != 1) {
                     $sql = "SELECT idtm_risiko, ris_name FROM tm_risiko ORDER BY idta_risiko_type";
                     $data = PFH::convertdbObjectArray(RisikoRecord::finder()->findAllBySql($sql), array("idtm_risiko", "ris_name"));
                 } else {
                     $data = array();
                     $data[0] = "START";
                 }
                 $this->parent_idtm_risiko->DataSource = $data;
                 $this->parent_idtm_risiko->dataBind();
                 break;
             case 1:
                 $sql = "SELECT idta_risiko_type, ris_type_name FROM ta_risiko_type";
                 $data = PFH::convertdbObjectArray(RisikoTypeRecord::finder()->findAllBySql($sql), array("idta_risiko_type", "ris_type_name"));
                 $this->edidta_risiko_type->DataSource = $data;
                 $this->edidta_risiko_type->dataBind();
                 if ($this->Request[$this->primarykey] != 1) {
                     $sql = "SELECT idtm_risiko, ris_name FROM tm_risiko ORDER BY idta_risiko_type";
                     $data = PFH::convertdbObjectArray(RisikoRecord::finder()->findAllBySql($sql), array("idtm_risiko", "ris_name"));
                 } else {
                     $data = array();
                     $data[0] = "START";
                 }
                 $this->edparent_idtm_risiko->DataSource = $data;
                 $this->edparent_idtm_risiko->dataBind();
                 $this->fillValues($this->getSelected($this->Request[$this->primarykey]));
                 //$this->bindListed();
                 break;
             default:
                 break;
         }
         $this->viewPanel->ActiveViewIndex = $this->Request['modus'];
         //the parameters for the RiskValueContainer
         $this->RCedrcv_tabelle->Text = "tm_risiko";
         $this->RCedrcv_id->Text = $this->Request[$this->primarykey];
     }
 }
Ejemplo n.º 5
0
 public function createRiskPullDown()
 {
     //Als erstes die Organisation
     $this->RCedidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type = 4");
     $this->RCedidtm_organisation->dataBind();
     //risiko oder chance
     $data = array(0 => "Risiko", 1 => "Chance", "leer" => "leer");
     $this->RCedrcv_type->DataSource = $data;
     $this->RCedrcv_type->DataBind();
     //die Risikoklasse
     $this->RCedidtm_risiko->DataSource = PFH::build_SQLPullDown(RisikoRecord::finder(), "tm_risiko", array("idtm_risiko", "ris_name"));
     $this->RCedidtm_risiko->dataBind();
     //ewk
     $data = array(0 => "leer", 1 => "gering", 2 => "mittel", 3 => "hoch", 4 => "sehr hoch");
     $this->RCTTedrcv_ewk->DataSource = $data;
     $this->RCTTedrcv_ewk->DataBind();
     //prio
     $data = array(0 => "leer", 1 => "10", 2 => "20", 3 => "30", 4 => "40", 5 => "50", 6 => "60", 7 => "70", 8 => "80", 9 => "90");
     $this->RCTTedrcv_prio->DataSource = $data;
     $this->RCTTedrcv_prio->DataBind();
 }