コード例 #1
0
 protected function renderContent()
 {
     $model = new Employee('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Employee'])) {
         $model->attributes = $_GET['Employee'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('DaftarKaryawan', array('model' => $model));
 }
コード例 #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     if (Yii::app()->user->checkAccess('employee.index') || Yii::app()->user->checkAccess('employee.create') || Yii::app()->user->checkAccess('employee.update') || Yii::app()->user->checkAccess('employee.delete')) {
         $model = new Employee('search');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['Employee'])) {
             $model->attributes = $_GET['Employee'];
         }
         if (isset($_GET['pageSize'])) {
             Yii::app()->user->setState('employeePageSize', (int) $_GET['pageSize']);
             unset($_GET['pageSize']);
         }
         if (isset($_GET['archivedEmployee'])) {
             Yii::app()->user->setState('employee_archived', $_GET['archivedEmployee']);
             unset($_GET['archivedEmployee']);
         }
         $model->employee_archived = Yii::app()->user->getState('employee_archived', Yii::app()->params['defaultArchived']);
         $this->render('admin', array('model' => $model));
     } else {
         throw new CHttpException(403, 'You are not authorized to perform this action');
     }
 }
コード例 #3
0
 public function actionExport()
 {
     $model = new Employee();
     $model->unsetAttributes();
     // clear any default values
     if (isset($_POST['Employee'])) {
         $model->attributes = $_POST['Employee'];
     }
     $exportType = $_POST['fileType'];
     $this->widget('ext.heart.export.EHeartExport', array('title' => 'List of Employee', 'dataProvider' => $model->search(), 'filter' => $model, 'grid_mode' => 'export', 'exportType' => $exportType, 'columns' => array('employee_id', 'name')));
 }
コード例 #4
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Employee('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Employee'])) {
         $model->attributes = $_GET['Employee'];
     }
     $this->render('admin', array('model' => $model));
 }
コード例 #5
0
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $this->lookupdata();
     $model = new Employee('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Employee'])) {
         $model->attributes = $_GET['Employee'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'employeeaddress' => $this->employeeaddress, 'employeeeducation' => $this->employeeeducation, 'employeeinformal' => $this->employeeinformal, 'employeewo' => $this->employeewo, 'employeefamily' => $this->employeefamily));
 }
コード例 #6
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     date_default_timezone_set("Asia/Manila");
     $activity = new Activity();
     $activity->act_desc = 'Viewed Employee List';
     $activity->act_datetime = date('Y-m-d G:i:s');
     $activity->act_by = User::model()->findByPK(Yii::app()->user->name)->emp_id;
     $activity->save();
     $model = new Employee('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Employee'])) {
         $model->attributes = $_GET['Employee'];
     }
     $this->render('admin', array('model' => $model));
 }