当前位置: 首页>>代码示例>>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;未经允许,请勿转载。