当前位置: 首页>>代码示例>>PHP>>正文


PHP Employee::getEmpNumber方法代码示例

本文整理汇总了PHP中Employee::getEmpNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP Employee::getEmpNumber方法的具体用法?PHP Employee::getEmpNumber怎么用?PHP Employee::getEmpNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Employee的用法示例。


在下文中一共展示了Employee::getEmpNumber方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveEmployee

 /**
  * Save Employee
  * @param Employee $employee
  * @returns boolean
  * @throws DaoException
  */
 public function saveEmployee(Employee $employee)
 {
     try {
         if ($employee->getEmpNumber() == '') {
             $idGenService = new IDGeneratorService();
             $idGenService->setEntity($employee);
             $employee->setEmpNumber($idGenService->getNextID());
         }
         $employee->save();
         return $employee;
         // @codeCoverageIgnoreStart
     } catch (Exception $e) {
         throw new DaoException($e->getMessage(), $e->getCode(), $e);
     }
     // @codeCoverageIgnoreEnd
 }
开发者ID:CamilleCrespeau,项目名称:orangehrm,代码行数:22,代码来源:EmployeeDao.php

示例2: getEmployeeAllowedToApplyLeaveTypes

 /**
  *
  * @param Employee $employee
  * @return LeaveType Collection
  */
 public function getEmployeeAllowedToApplyLeaveTypes(Employee $employee)
 {
     try {
         $leaveEntitlementService = $this->getLeaveEntitlementService();
         $strategy = $this->getLeaveEntitlementService()->getLeaveEntitlementStrategy();
         $leaveTypeService = $this->getLeaveTypeService();
         $leaveTypes = $leaveTypeService->getLeaveTypeList();
         $leaveTypeList = array();
         foreach ($leaveTypes as $leaveType) {
             $balance = $leaveEntitlementService->getLeaveBalance($employee->getEmpNumber(), $leaveType->getId());
             if ($balance->getEntitled() > 0) {
                 array_push($leaveTypeList, $leaveType);
             }
         }
         return $leaveTypeList;
     } catch (Exception $e) {
         throw new LeaveServiceException($e->getMessage());
     }
 }
开发者ID:lahirwisada,项目名称:orangehrm,代码行数:24,代码来源:LeaveRequestService.php

示例3: getEmployeeAllowedToApplyLeaveTypes

 /**
  *
  * @param Employee $employee
  * @return LeaveType Collection
  */
 public function getEmployeeAllowedToApplyLeaveTypes(Employee $employee)
 {
     try {
         $leavePeriodService = $this->getLeavePeriodService();
         $leavePeriod = $leavePeriodService->getCurrentLeavePeriod();
         $leaveEntitlementService = $this->getLeaveEntitlementService();
         $leaveTypeService = $this->getLeaveTypeService();
         $leaveTypes = $leaveTypeService->getLeaveTypeList();
         $leaveTypeList = array();
         foreach ($leaveTypes as $leaveType) {
             $entitlementDays = $leaveEntitlementService->getLeaveBalance($employee->getEmpNumber(), $leaveType->getLeaveTypeId(), $leavePeriod->getLeavePeriodId());
             if ($entitlementDays > 0) {
                 array_push($leaveTypeList, $leaveType);
             }
         }
         return $leaveTypeList;
     } catch (Exception $e) {
         throw new LeaveServiceException($e->getMessage());
     }
 }
开发者ID:THM068,项目名称:orangehrm,代码行数:25,代码来源:LeaveRequestService.php

示例4: saveContactDetails

 /**
  * Save Contact Details
  * @param Employee $employee
  * @returns boolean
  * @throws DaoException
  */
 public function saveContactDetails(Employee $employee)
 {
     try {
         $countryCode = $employee->country;
         $q = Doctrine_Query::create()->update('Employee')->set('street1', '?', $employee->getStreet1())->set('street2', '?', $employee->getStreet2())->set('city', '?', $employee->getCity())->set('province', '?', $employee->getProvince())->set('emp_zipcode', '?', $employee->getEmpZipcode())->set('emp_hm_telephone', '?', $employee->getEmpHmTelephone())->set('emp_mobile', '?', $employee->getEmpMobile())->set('emp_work_telephone', '?', $employee->getEmpWorkTelephone())->set('emp_work_email', '?', $employee->getEmpWorkEmail())->set('emp_oth_email', '?', $employee->getEmpOthEmail());
         if (trim($employee->country) == "") {
             $q->set('country', '?', 'NULL');
         } else {
             $q->set('country', '?', $employee->country);
         }
         $q->where('empNumber = ?', $employee->getEmpNumber());
         $q->execute();
         return true;
     } catch (Exception $e) {
         throw new DaoException($e->getMessage());
     }
 }
开发者ID:rabbitdigital,项目名称:HRM,代码行数:23,代码来源:EmployeeDao.php


注:本文中的Employee::getEmpNumber方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。