From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- .../pages/Controls/Samples/TCheckBoxList/Home.php | 138 ++++++++++----------- 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList') diff --git a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php index 08c6f3ca..ac7ca8bc 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php +++ b/demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php @@ -1,70 +1,70 @@ -IsPostBack) - { - $data=array('item 1','item 2','item 3','item 4'); - $this->DBCheckBoxList1->DataSource=$data; - $this->DBCheckBoxList1->dataBind(); - - $data=array('key 1'=>'item 1','key 2'=>'item 2', - 'key 3'=>'item 3','key 4'=>'item 4'); - $this->DBCheckBoxList2->DataSource=$data; - $this->DBCheckBoxList2->dataBind(); - - $data=array( - array('id'=>'001','name'=>'John','age'=>31), - array('id'=>'002','name'=>'Mary','age'=>30), - array('id'=>'003','name'=>'Cary','age'=>20)); - $this->DBCheckBoxList3->DataSource=$data; - $this->DBCheckBoxList3->dataBind(); - } - } - - protected function collectSelectionResult($input,$output) - { - $indices=$input->SelectedIndices; - $result=''; - foreach($indices as $index) - { - $item=$input->Items[$index]; - $result.="(Index: $index, Value: $item->Value, Text: $item->Text)"; - } - if($result==='') - $output->Text='Your selection is empty.'; - else - $output->Text='Your selection is: '.$result; - } - - public function buttonClicked($sender,$param) - { - $this->collectSelectionResult($this->CheckBoxList,$this->SelectionResult); - } - - public function selectionChanged($sender,$param) - { - $this->collectSelectionResult($sender,$this->SelectionResult2); - } - - public function DBCheckBoxList1Changed($sender,$param) - { - $this->collectSelectionResult($sender,$this->DBCheckBoxList1Result); - } - - public function DBCheckBoxList2Changed($sender,$param) - { - $this->collectSelectionResult($sender,$this->DBCheckBoxList2Result); - } - - public function DBCheckBoxList3Changed($sender,$param) - { - $this->collectSelectionResult($sender,$this->DBCheckBoxList3Result); - } - -} - +IsPostBack) + { + $data=array('item 1','item 2','item 3','item 4'); + $this->DBCheckBoxList1->DataSource=$data; + $this->DBCheckBoxList1->dataBind(); + + $data=array('key 1'=>'item 1','key 2'=>'item 2', + 'key 3'=>'item 3','key 4'=>'item 4'); + $this->DBCheckBoxList2->DataSource=$data; + $this->DBCheckBoxList2->dataBind(); + + $data=array( + array('id'=>'001','name'=>'John','age'=>31), + array('id'=>'002','name'=>'Mary','age'=>30), + array('id'=>'003','name'=>'Cary','age'=>20)); + $this->DBCheckBoxList3->DataSource=$data; + $this->DBCheckBoxList3->dataBind(); + } + } + + protected function collectSelectionResult($input,$output) + { + $indices=$input->SelectedIndices; + $result=''; + foreach($indices as $index) + { + $item=$input->Items[$index]; + $result.="(Index: $index, Value: $item->Value, Text: $item->Text)"; + } + if($result==='') + $output->Text='Your selection is empty.'; + else + $output->Text='Your selection is: '.$result; + } + + public function buttonClicked($sender,$param) + { + $this->collectSelectionResult($this->CheckBoxList,$this->SelectionResult); + } + + public function selectionChanged($sender,$param) + { + $this->collectSelectionResult($sender,$this->SelectionResult2); + } + + public function DBCheckBoxList1Changed($sender,$param) + { + $this->collectSelectionResult($sender,$this->DBCheckBoxList1Result); + } + + public function DBCheckBoxList2Changed($sender,$param) + { + $this->collectSelectionResult($sender,$this->DBCheckBoxList2Result); + } + + public function DBCheckBoxList3Changed($sender,$param) + { + $this->collectSelectionResult($sender,$this->DBCheckBoxList3Result); + } + +} + ?> \ No newline at end of file -- cgit v1.2.3