示例#1
0
 public function defineWorkflowParameter()
 {
     //        /* start define hod */
     //        include_once "../hr/class/Employee.php";
     //        $emp = new Employee();
     //
     switch ($this->window_workflow) {
         case "LEAVE":
             include_once "../hr/class/Leave.php";
             $lev = new Leave();
             $lev->leave_id = $this->primarykey_value;
             $lev->person_id = $this->person_id;
             $lev->window_workflow = $this->window_workflow;
             return $lev->defineWorkflowParameter();
             break;
         case "GENERCLAIM":
             include_once "../hr/class/Generalclaim.php";
             $gen = new Generalclaim();
             $gen->generalclaim_id = $this->primarykey_value;
             $gen->person_id = $this->person_id;
             $gen->window_workflow = $this->window_workflow;
             return $gen->defineWorkflowParameter();
             break;
         case "MEDICCLAIM":
             include_once "../hr/class/Medicalclaim.php";
             $me = new Medicalclaim();
             $me->medicalclaim_id = $this->primarykey_value;
             $me->person_id = $this->person_id;
             $me->window_workflow = $this->window_workflow;
             return $me->defineWorkflowParameter();
             break;
         case "OVERCLAIM":
             include_once "../hr/class/Overtimeclaim.php";
             $ov = new Overtimeclaim();
             $ov->overtimeclaim_id = $this->primarykey_value;
             $ov->person_id = $this->person_id;
             $ov->window_workflow = $this->window_workflow;
             return $ov->defineWorkflowParameter();
             break;
         case "TRAVECLAIM":
             include_once "../hr/class/Travellingclaim.php";
             $tr = new Travellingclaim();
             $tr->travellingclaim_id = $this->primarykey_value;
             $tr->person_id = $this->person_id;
             $tr->window_workflow = $this->window_workflow;
             return $tr->defineWorkflowParameter();
             break;
         case "LEAVEADJ":
             include_once "../hr/class/Leaveadjustment.php";
             $led = new Leaveadjustment();
             $led->leaveadjustment_id = $this->primarykey_value;
             $led->person_id = $this->person_id;
             $led->window_workflow = $this->window_workflow;
             return $led->defineWorkflowParameter();
             break;
         default:
             break;
     }
 }
 public function defineWorkflowParameter()
 {
     global $xoopsUser;
     switch ($this->window_workflow) {
         case "LEAVE":
             include_once "../hr/class/Leave.php";
             $lev = new Leave();
             $lev->leave_id = $this->primarykey_value;
             $lev->person_id = $this->person_id;
             $lev->window_workflow = $this->window_workflow;
             return $lev->defineWorkflowParameter();
             break;
         case "GENERCLAIM":
             include_once "../hr/class/Generalclaim.php";
             $gen = new Generalclaim();
             $gen->generalclaim_id = $this->primarykey_value;
             $gen->person_id = $this->person_id;
             $gen->window_workflow = $this->window_workflow;
             return $gen->defineWorkflowParameter();
             break;
         case "MEDICCLAIM":
             include_once "../hr/class/Medicalclaim.php";
             $me = new Medicalclaim();
             $me->medicalclaim_id = $this->primarykey_value;
             $me->person_id = $this->person_id;
             $me->window_workflow = $this->window_workflow;
             return $me->defineWorkflowParameter();
             break;
         case "OVERCLAIM":
             include_once "../hr/class/Overtimeclaim.php";
             $ov = new Overtimeclaim_id();
             $ov->overtimeclaim_id = $this->primarykey_value;
             $ov->person_id = $this->person_id;
             $ov->window_workflow = $this->window_workflow;
             return $ov->defineWorkflowParameter();
             break;
         case "TRAVECLAIM":
             include_once "../hr/class/Travellingclaim.php";
             $tr = new Travellingclaim();
             $tr->travellingclaim_id = $this->primarykey_value;
             $tr->person_id = $this->person_id;
             $tr->window_workflow = $this->window_workflow;
             return $tr->defineWorkflowParameter();
             break;
         case "LEAVEADJ":
             include_once "../hr/class/Leaveadjustment.php";
             $led = new Leaveadjustment();
             $led->leaveadjustment_id = $this->primarykey_value;
             $led->person_id = $this->person_id;
             $led->window_workflow = $this->window_workflow;
             return $led->defineWorkflowParameter();
             break;
         default:
             break;
     }
     //        $uid = $xoopsUser->getVar('uid');
     //        /* start define hod */
     //        include_once "../hr/class/Employee.php";
     //        $emp = new Employee();
     //
     //        $hod_uid = $emp->getSupervisorEmployeeID($uid);
     //        /* end */
     //      return $parameter_array = array(
     //                                '{own_uid}'=>$uid,
     //                                '{hod_uid}'=>$hod_uid,
     //                                '{email_list}'=>'',
     //                                '{sms_list}'=>'',
     //                                '{bypassapprove}'=>false
     //                                    );
 }