當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PageList::onLoad方法代碼示例

本文整理匯總了PHP中PageList::onLoad方法的典型用法代碼示例。如果您正苦於以下問題:PHP PageList::onLoad方法的具體用法?PHP PageList::onLoad怎麽用?PHP PageList::onLoad使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PageList的用法示例。


在下文中一共展示了PageList::onLoad方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $FilterEmployee = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterEmployee'];
         if ($FilterEmployee) {
             $this->FilterEmployee->Text = $FilterEmployee;
         }
         $FilterDepartment = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterDepartment'];
         $this->FilterDepartment->DataSource = $this->DepartmentList;
         $this->FilterDepartment->dataBind();
         if ($FilterDepartment) {
             $this->FilterDepartment->setSelectedValue($FilterDepartment);
         } else {
             $this->FilterDepartment->setSelectedIndex(0);
         }
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:26,代碼來源:workingtime.php

示例2: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $app = $this->getApplication();
     $usedId = $app->getUser()->getUserID() == null ? 0 : $app->getUser()->getUserID();
     $cmd = $this->db->createCommand("SELECT user_id FROM hr_superusers WHERE id={$usedId}");
     $data = $cmd->query();
     $dataUser = $data->read();
     $this->userId = $dataUser['user_id'];
     $this->employee = new employee($this->userId);
     $this->tbb->setTitle(Prado::localize("Leave request") . " - " . $this->employee->getFullName());
     if (!$this->IsPostBack) {
         if (Prado::getApplication()->getSession()->contains($this->getApplication()->getService()->getRequestedPagePath() . 'FilterState')) {
             $FilterState = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterState'];
         } else {
             $FilterState = 'all';
         }
         $this->FilterState->setSelectedValue($FilterState);
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:28,代碼來源:leaverequest.php

示例3: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $this->setHoruxSysTray(true);
     if (!$this->IsPostBack) {
         $FilterIdentificator = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterIdentificator'];
         $FilterUsed = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterUsed'];
         $FilterStatus = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterStatus'];
         $FilterSerialNumber = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterSerialNumber'];
         if ($FilterIdentificator) {
             $this->FilterIdentificator->Text = $FilterIdentificator;
         }
         if ($FilterSerialNumber) {
             $this->FilterSerialNumber->Text = $FilterSerialNumber;
         }
         if ($FilterUsed) {
             $this->FilterUsed->setSelectedValue($FilterUsed);
         }
         if ($FilterStatus) {
             $this->FilterStatus->setSelectedValue($FilterStatus);
         }
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterIdentificator'] = $this->FilterIdentificator->SafeText;
     $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterSerialNumber'] = $this->FilterSerialNumber->SafeText;
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:33,代碼來源:KeyList.php

示例4: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:8,代碼來源:exportData.php

示例5: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $app = $this->getApplication();
     $usedId = $app->getUser()->getUserID() == null ? 0 : $app->getUser()->getUserID();
     $cmd = $this->db->createCommand("SELECT user_id FROM hr_superusers WHERE id={$usedId}");
     $data = $cmd->query();
     $dataUser = $data->read();
     $this->userId = $dataUser['user_id'];
     $this->employee = new employee($this->userId);
     $this->tbb->setTitle(Prado::localize("My sign in/out") . " - " . $this->employee->getFullName());
     if (!$this->IsPostBack) {
         $cmd = $this->db->createCommand("SELECT t.date FROM hr_tracking AS t WHERE t.id_user=" . $this->userId . " ORDER BY t.date LIMIT 0,1");
         $data = $cmd->query();
         $data = $data->readAll();
         $year = date("Y");
         if (count($data) > 0) {
             $year = explode("-", $data[0]['date']);
             $year = $year[0];
         }
         $currentYear = date("Y");
         $yearList = array();
         for ($i = $year; $i <= $currentYear; $i++) {
             $yearList[] = array('Value' => $i, 'Text' => $i);
         }
         $this->FilterYear->DataSource = $yearList;
         $this->FilterYear->dataBind();
         if (Prado::getApplication()->getSession()->contains($this->getApplication()->getService()->getRequestedPagePath() . 'FilterYear')) {
             $FilterYear = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterYear'];
             $FilterMonth = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterMonth'];
         } else {
             $FilterYear = date('Y');
             $FilterMonth = date('n');
         }
         $FilterStatus = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterStatus'];
         if ($FilterStatus) {
             $this->FilterStatus->setSelectedValue($FilterStatus);
         }
         if ($FilterYear) {
             $this->FilterYear->setSelectedValue($FilterYear);
         }
         if ($FilterMonth) {
             $this->FilterMonth->setSelectedValue($FilterMonth);
         }
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:54,代碼來源:mybooking.php

示例6: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $app = $this->getApplication();
     $usedId = $app->getUser()->getUserID() == null ? 0 : $app->getUser()->getUserID();
     $cmd = $this->db->createCommand("SELECT user_id FROM hr_superusers WHERE id={$usedId}");
     $data = $cmd->query();
     $dataUser = $data->read();
     $this->userId = $dataUser['user_id'];
     $this->employee = new employee($this->userId);
     if (!$this->IsPostBack) {
         $FilterEmployee = "";
         if (isset($this->Request['id'])) {
             $cmd = $this->db->createCommand("SELECT CONCAT(name, ' ' , firstname) AS employee FROM hr_user  WHERE id=:id");
             $id = $this->Request['id'];
             $cmd->bindValue(":id", $id, PDO::PARAM_STR);
             $data = $cmd->query();
             $data = $data->read();
             $FilterEmployee = $data['employee'];
         } else {
             $FilterEmployee = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterEmployee'];
         }
         $FilterTimecode = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterTimecode'];
         $FilterDepartment = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterDepartment'];
         $this->FilterTimecode->DataSource = $this->TimeCode;
         $this->FilterTimecode->dataBind();
         $this->FilterDepartment->DataSource = $this->DepartmentList;
         $this->FilterDepartment->dataBind();
         if ($FilterEmployee) {
             $this->FilterEmployee->Text = $FilterEmployee;
         }
         if ($FilterDepartment) {
             $this->FilterDepartment->setSelectedValue($FilterDepartment);
         } else {
             $this->FilterDepartment->setSelectedIndex(0);
         }
         if ($FilterTimecode) {
             $this->FilterTimecode->setSelectedValue($FilterTimecode);
         } else {
             $this->FilterTimecode->setSelectedIndex(0);
         }
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:51,代碼來源:counter.php

示例7: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:14,代碼來源:messageInfoList.php

示例8: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $asset = $this->Application->getAssetManager();
     $url = $asset->publishFilePath('./protected/pages/components/translate/assets/icon-48-translate.png');
     if (!$this->IsPostBack) {
         $this->language->DataTextField = "Text";
         $this->language->DataValueField = "Value";
         $this->language->DataSource = $this->getLanguage();
         $this->language->dataBind();
         $this->extension->DataTextField = "Text";
         $this->extension->DataValueField = "Value";
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:14,代碼來源:translate.php

示例9: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!is_writeable('./tmp')) {
         $this->displayMessage(Prado::localize('The directory ./tmp must be writeable to install an extension'), false);
     }
     if (!$this->IsPostBack) {
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:17,代碼來源:timecode.php

示例10: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $cmd = $this->db->createCommand("SELECT t.startDate FROM hr_timux_workingtime AS t ORDER BY t.startDate LIMIT 0,1");
         $data = $cmd->query();
         $data = $data->readAll();
         $year = date("Y");
         if (count($data) > 0) {
             $year = explode("-", $data[0]['startDate']);
             $year = $year[0];
         }
         $currentYear = date("Y");
         $yearList = array();
         for ($i = $year; $i <= $currentYear; $i++) {
             $yearList[] = array('Value' => $i, 'Text' => $i);
         }
         $this->FilterYear->DataSource = $yearList;
         $this->FilterYear->dataBind();
         if (Prado::getApplication()->getSession()->contains($this->getApplication()->getService()->getRequestedPagePath() . 'FilterYear')) {
             $FilterYear = $this->Session[$this->getApplication()->getService()->getRequestedPagePath() . 'FilterYear'];
         } else {
             $FilterYear = date('Y');
         }
         if ($FilterYear) {
             $this->FilterYear->setSelectedValue($FilterYear);
         }
         if ($this->FilterYear->getSelectedValue() == date('Y')) {
             $month = date('n');
             for ($i = 1; $i <= 12; $i++) {
                 if ($i >= $month) {
                     $b = 'monthBalance_' . $i;
                     $this->{$b}->setVisible(false);
                     $b = 'monthLoad_' . $i;
                     $this->{$b}->setVisible(false);
                 }
             }
         }
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:46,代碼來源:report.php

示例11: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
     $param = $this->Application->getParameters();
     $superAdmin = $this->Application->getUser()->getSuperAdmin();
     if ($param['appMode'] == 'demo' && $superAdmin == 0) {
         $this->tbb->delete->setEnabled(false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:19,代碼來源:openTimeList.php

示例12: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $update = new HoruxGuiUpdate();
         $res = $update->compareFiles();
         if (is_array($res)) {
             if (count($res) > 0) {
                 $this->displayMessage(Prado::localize("Your version is not up to date"), false);
                 $this->DataGrid->DataSource = $res;
                 $this->DataGrid->dataBind();
             } else {
                 $this->displayMessage(Prado::localize("Your version is up to date"), true);
             }
         } else {
             $this->displayMessage($res, false);
         }
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:19,代碼來源:Update.php

示例13: onLoad

 public function onLoad($param)
 {
     $url = $this->publishAsset('./assets/icon.css');
     $this->publishAsset('./assets/icon-32-import.png');
     $this->getClientScript()->registerStyleSheetFile('treeCss', $url);
     //$this->getClientScript()->registerStyleSheetFile('treeCss','./protected/pages/components/export/assets/icon.css');
     parent::onLoad($param);
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
     if (!$this->IsPostBack) {
         $cmd = NULL;
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:19,代碼來源:import.php

示例14: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $this->display->DataTextField = 'Text';
         $this->display->DataValueField = 'Value';
         $this->display->DataSource = $this->Display;
         $this->display->dataBind();
         if (count($this->Display) > 0) {
             $this->display->setSelectedIndex(0);
             $this->DataGrid->DataSource = $this->Data;
             $this->DataGrid->dataBind();
         }
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:21,代碼來源:mediaList.php

示例15: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     $cmd = $this->db->createCommand("SELECT id\n                                            FROM `hr_timux_booking_bde` AS tbb\n                                            LEFT JOIN hr_timux_booking AS tb ON tbb.tracking_id = tb.tracking_id\n                                            WHERE `action` =254");
     $data = $cmd->query();
     $data = $data->readAll();
     foreach ($data as $d) {
         $cmd = $this->db->createCommand("UPDATE hr_timux_booking_bde SET tracking_id = tracking_id +1 WHERE id=" . $d['id']);
         $cmd->execute();
     }
     if (!$this->IsPostBack) {
         $this->DataGrid->DataSource = $this->Data;
         $this->DataGrid->dataBind();
     }
     if (isset($this->Request['okMsg'])) {
         $this->displayMessage($this->Request['okMsg'], true);
     }
     if (isset($this->Request['koMsg'])) {
         $this->displayMessage($this->Request['koMsg'], false);
     }
 }
開發者ID:BackupTheBerlios,項目名稱:horux-svn,代碼行數:21,代碼來源:timeclasses.php


注:本文中的PageList::onLoad方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。