• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP EmployeePeer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: doSelectOrdered

 public static function doSelectOrdered()
 {
     $criteria = new Criteria();
     $criteria->addAscendingOrderByColumn(EmployeePeer::EMP_NO);
     $criteria->addAscendingOrderByColumn(EmployeePeer::NAME);
     return EmployeePeer::doSelect($criteria);
 }
开发者ID:taryono,项目名称:school,代码行数:7,代码来源:EmployeePeer.php


示例2: configure

 public function configure()
 {
     $years = range(date('Y') - 100, date('Y') + 5);
     //Creates array of years between 1920-2000
     $years_list = array_reverse(array_combine($years, $years), true);
     //Creates new array where key and value are both values from $years list
     sfProjectConfiguration::getActive()->loadHelpers('Global');
     unset($this['created_at'], $this['updated_at'], $this['clearance'], $this['keys_returned'], $this['email_removed'], $this['server_removed'], $this['dist_list_removed']);
     $this->widgetSchema['dob'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{changeYear:true, yearRange: \'1920:2009\'}'), array('class' => 'date'));
     $this->widgetSchema['license_expiration'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['doh'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['physical_date'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['tb_date'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['osha_date'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['cpr_date'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['dof'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['tc_effective'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['tc_exp'] = new sfWidgetFormJQueryDate(array('years' => $years_list, 'image' => '/images/calendar.png', 'config' => '{}'), array('class' => 'date'));
     $this->widgetSchema['tc_type'] = new sfWidgetFormChoice(array('expanded' => false, 'multiple' => false, 'choices' => EmployeePeer::getTcTypeOptions()));
     $this->validatorSchema['tc_type'] = new sfValidatorChoice(array('required' => false, 'multiple' => false, 'choices' => array_keys(EmployeePeer::getTcTypeOptions())));
     $this->widgetSchema['employee_to_location_list']->setOption('expanded', true);
     $this->widgetSchema['employee_finger_to_location_list']->setOption('expanded', true);
     $this->widgetSchema['tc_type']->setLabel('Teacher Cert. Type');
     $this->widgetSchema['tc_effective']->setLabel('Teacher Cert. Effective');
     $this->widgetSchema['tc_number']->setLabel('Teacher Cert. Number');
     $this->widgetSchema['tc_exp']->setLabel('Cert. Through (expires)');
     $this->widgetSchema['has_dist_list']->setLabel('On distribution list');
     // $this->widgetSchema['clearance']->setLabel('SCR Clearance');
     $this->widgetSchema['first_name']->setLabel('First Name');
     $this->widgetSchema['last_name']->setLabel('Last Name');
     $this->widgetSchema['job_id']->setLabel('Job Title');
     $this->widgetSchema['home_phone']->setLabel('Home Phone');
     $this->widgetSchema['cell_phone']->setLabel('Cell Phone');
     $this->widgetSchema['company_email']->setLabel('Company Email');
     $this->widgetSchema['personal_email']->setLabel('Personal Email');
     $this->widgetSchema['zip']->setLabel('ZIP');
     $this->widgetSchema['ssn']->setLabel('SSN');
     $this->widgetSchema['npi']->setLabel('NPI');
     $this->widgetSchema['doh']->setLabel('Date of Hire');
     $this->widgetSchema['dof']->setLabel('Date of Termination');
     $this->widgetSchema['dob']->setLabel('DOB');
     $this->widgetSchema['license_number']->setLabel('License Number');
     $this->widgetSchema['license_expiration']->setLabel('License Expires');
     $this->widgetSchema['physical_date']->setLabel('Physical Expiration Date');
     $this->widgetSchema['physical_notes']->setLabel('Physical Notes');
     $this->widgetSchema['tb_date']->setLabel('TB Expiration Date');
     $this->widgetSchema['tb_notes']->setLabel('TB Notes');
     $this->widgetSchema['osha_date']->setLabel('OSHA Expiration Date');
     $this->widgetSchema['cpr_date']->setLabel('CPR Expiration Date');
     $this->widgetSchema['suplimental_health']->setLabel('Supplemental health');
     $this->widgetSchema['employee_finger_to_location_list']->setLabel('Fingerprints');
     $this->widgetSchema['finger_print_notes']->setLabel('Fingerprint Notes');
     $this->widgetSchema['employee_to_location_list']->setLabel('SCR Clearance');
     $this->widgetSchema['picture'] = new sfWidgetFormInputFileEditable(array('label' => 'Picture', 'file_src' => '/uploads/' . sfConfig::get('app_employee_images_dir', 'employee') . '/' . $this->getObject()->getPicture(), 'is_image' => false, 'edit_mode' => !$this->isNew(), 'template' => '<div><label>Delete the picture?</label> %delete%<br /><label>New Picture</label> %input%</div>'));
     $this->validatorSchema['picture'] = new sfValidatorFile();
     $this->validatorSchema['picture']->setOption('required', false);
     $this->validatorSchema['picture_delete'] = new sfValidatorBoolean();
 }
开发者ID:anvaya,项目名称:nckids,代码行数:58,代码来源:EmployeeForm.class.php


示例3: getSpecial

 public function getSpecial()
 {
     $c = new Criteria();
     $cton1 = $c->getNewCriterion(EmployeePeer::STAFF_TYPE_ID, 13);
     $cton2 = $c->getNewCriterion(EmployeePeer::STAFF_TYPE_ID, 14);
     $cton1->addOr($cton2);
     $c->add($cton1);
     $special = EmployeePeer::doSelectOne($c);
     return $special;
 }
开发者ID:taryono,项目名称:school,代码行数:10,代码来源:Employee.php


示例4: GetStaff

 public static function GetStaff()
 {
     $c = new Criteria();
     $c->add(EmployeePeer::STATUS, Constant::RECORD_STATUS_ACTIVE);
     $c->add(EmployeePeer::EMP_CATEGORY, 'staff');
     $employees = EmployeePeer::doSelect($c);
     if ($employees) {
         return $employees;
     } else {
         return false;
     }
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:12,代码来源:EmployeePeer.php


示例5: configure

 public function configure()
 {
     unset($this['note_entry_id']);
     $this->widgetSchema['delete'] = new sfWidgetFormInputHidden(array('default' => '0'));
     $this->validatorSchema['delete'] = new sfValidatorBoolean();
     $employee = EmployeePeer::retrieveByPK($this->getOption('employee_id'));
     $c = new Criteria();
     $c->add(AreaOfConcernPeer::JOB_ID, $employee->getJobId());
     // if job_id = special instruction (7), they also need to see speech (8)
     if ($employee->getJobId() == 7) {
         $c->addOr(AreaOfConcernPeer::JOB_ID, 8);
     }
     $this->widgetSchema['area_of_concern_id']->setOption('criteria', $c);
     $c = new Criteria();
     $c->add(PromptPeer::ID, 44, Criteria::GREATER_EQUAL);
     $this->widgetSchema['prompt_id']->setOption('criteria', $c);
     $this->widgetSchema['accuracy'] = new sfWidgetFormSelect(array('choices' => EntryConcernPeer::getAccuracyChoices()));
     $this->widgetSchema->setLabels(array('area_of_concern_id' => 'Area of concern', 'objective_id' => 'Objective', 'prompt_id' => 'Prompt', 'level_id' => 'Level', 'accuracy' => 'Accuracy'));
 }
开发者ID:anvaya,项目名称:nckids,代码行数:19,代码来源:EntryConcernForm.class.php


示例6: executeChartEmployees

 public function executeChartEmployees()
 {
     $data = array();
     foreach (JobPeer::doSelect(new Criteria()) as $job) {
         $c = new Criteria();
         $c->add(EmployeePeer::JOB_ID, $job->getId());
         $data[$job->getName()] = EmployeePeer::doCount($c);
     }
     //To create a bar chart we need to create a stBarOutline Object
     $bar = new stBarOutline(80, '#78B9EC', '#3495FE');
     $bar->key('', 10);
     //Passing the random data to bar chart
     $bar->data = $data;
     //Creating a stGraph object
     $g = new stGraph();
     $g->title('Employee Job Type Break-Down', '{font-size: 20px;}');
     $g->bg_colour = '#FFFFFF';
     $g->set_inner_background('#E3F0FD', '#CBD7E6', 90);
     $g->x_axis_colour('#8499A4', '#E4F5FC');
     $g->y_axis_colour('#8499A4', '#E4F5FC');
     //Pass stBarOutline object i.e. $bar to graph
     $g->data_sets[] = $bar;
     //Setting labels for X-Axis
     $g->set_x_labels(array_keys($data));
     // to set the format of labels on x-axis e.g. font, color, step
     $g->set_x_label_style(10, '#18A6FF', 0, 2);
     // To tick the values on x-axis
     // 2 means tick every 2nd value
     $g->set_x_axis_steps(2);
     //set maximum value for y-axis
     //we can fix the value as 20, 10 etc.
     //but its better to use max of data
     $g->set_y_max(max($data));
     $g->y_label_steps(4);
     $g->set_y_legend('# Employees', 12, '#18A6FF');
     echo $g->render();
     return sfView::NONE;
 }
开发者ID:anvaya,项目名称:nckids,代码行数:38,代码来源:actions.class.php


示例7: doOnDeleteCascade

 /**
  * This is a method for emulating ON DELETE CASCADE for DBs that don't support this
  * feature (like MySQL or SQLite).
  *
  * This method is not very speedy because it must perform a query first to get
  * the implicated records and then perform the deletes by calling those Peer classes.
  *
  * This method should be used within a transaction if possible.
  *
  * @param      Criteria $criteria
  * @param      PropelPDO $con
  * @return     int The number of affected rows (if supported by underlying database driver).
  */
 protected static function doOnDeleteCascade(Criteria $criteria, PropelPDO $con)
 {
     // initialize var to track total num of affected rows
     $affectedRows = 0;
     // first find the objects that are implicated by the $criteria
     $objects = RolePeer::doSelect($criteria, $con);
     foreach ($objects as $obj) {
         // delete related Employee objects
         $c = new Criteria(EmployeePeer::DATABASE_NAME);
         $c->add(EmployeePeer::ROLE_ID, $obj->getId());
         $affectedRows += EmployeePeer::doDelete($c, $con);
         // delete related User objects
         $c = new Criteria(UserPeer::DATABASE_NAME);
         $c->add(UserPeer::ROLE_ID, $obj->getId());
         $affectedRows += UserPeer::doDelete($c, $con);
     }
     return $affectedRows;
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:31,代码来源:BaseRolePeer.php


示例8: quickSave

 public function quickSave($aData)
 {
     if (isset($aData['app_msg_uid'])) {
         $o = EmployeePeer::retrieveByPk($aData['app_msg_uid']);
     }
     if (isset($o) && is_object($o) && get_class($o) == 'AppMessage') {
         $o->fromArray($aData, BasePeer::TYPE_FIELDNAME);
         $o->setAppMsgDate(date('Y-m-d H:i:s'));
         $o->save();
         return $o->getAppMsgUid();
     } else {
         $this->fromArray($aData, BasePeer::TYPE_FIELDNAME);
         $this->setAppMsgDate(date('Y-m-d H:i:s'));
         $this->save();
         return $this->getAppMsgUid();
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:17,代码来源:AppMessage.php


示例9: doSelectJoinAllExceptEmployeeDivision

 public static function doSelectJoinAllExceptEmployeeDivision(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     EmployeeDetailPeer::addSelectColumns($c);
     $startcol2 = EmployeeDetailPeer::NUM_COLUMNS - EmployeeDetailPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     EmployeePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + EmployeePeer::NUM_COLUMNS;
     ReligionPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + ReligionPeer::NUM_COLUMNS;
     ReligionPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ReligionPeer::NUM_COLUMNS;
     EmployeeLevelPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + EmployeeLevelPeer::NUM_COLUMNS;
     MaritalStatusPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + MaritalStatusPeer::NUM_COLUMNS;
     $c->addJoin(EmployeeDetailPeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(EmployeeDetailPeer::RELIGION_ID, ReligionPeer::ID);
     $c->addJoin(EmployeeDetailPeer::SPOUSE_RELIGION_ID, ReligionPeer::ID);
     $c->addJoin(EmployeeDetailPeer::EMPLOYEE_LEVEL_ID, EmployeeLevelPeer::ID);
     $c->addJoin(EmployeeDetailPeer::MARITAL_STATUS_ID, MaritalStatusPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = EmployeeDetailPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = EmployeePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getEmployee();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addEmployeeDetail($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initEmployeeDetails();
             $obj2->addEmployeeDetail($obj1);
         }
         $omClass = ReligionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getReligionRelatedByReligionId();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addEmployeeDetailRelatedByReligionId($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initEmployeeDetailsRelatedByReligionId();
             $obj3->addEmployeeDetailRelatedByReligionId($obj1);
         }
         $omClass = ReligionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getReligionRelatedBySpouseReligionId();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addEmployeeDetailRelatedBySpouseReligionId($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initEmployeeDetailsRelatedBySpouseReligionId();
             $obj4->addEmployeeDetailRelatedBySpouseReligionId($obj1);
         }
         $omClass = EmployeeLevelPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getEmployeeLevel();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addEmployeeDetail($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initEmployeeDetails();
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:BaseEmployeeDetailPeer.php


示例10: executeShowEmployeeSched2

 public function executeShowEmployeeSched2()
 {
     $employee = EmployeePeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($employee);
     $this->subtitle = $employee->toString() . ' - id:' . $employee->getId();
     $c = new Criteria();
     $c->add(EmployeeDetailPeer::EMPLOYEE_ID, $employee->getId());
     $employee_detail = EmployeeDetailPeer::doSelectOne($c);
     $actions = array(array('name' => 'back', 'url' => 'student_schedule/listSched2', 'color' => 'black'));
     $this->setTemplate('showEmployee');
     $this->actions = $actions;
     $this->employee = $employee;
     $this->employee_detail = $employee_detail;
 }
开发者ID:taryono,项目名称:school,代码行数:14,代码来源:actions.class.php


示例11: getEmployee

 /**
  * Get the associated Employee object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Employee The associated Employee object.
  * @throws     PropelException
  */
 public function getEmployee(PropelPDO $con = null)
 {
     if ($this->aEmployee === null && $this->employee_id !== null) {
         $c = new Criteria(EmployeePeer::DATABASE_NAME);
         $c->add(EmployeePeer::ID, $this->employee_id);
         $this->aEmployee = EmployeePeer::doSelectOne($c, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aEmployee->addUsers($this);
         		 */
     }
     return $this->aEmployee;
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:23,代码来源:BaseUser.php


示例12: filterSched

 public function filterSched($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $c->addJoin(SchedulePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CODE_CLASS') {
             $c->addJoin(SchedulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(SchedulePeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'SUBJECT_ID') {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(SubjectCurrPeer::ID, SchedulePeer::SUBJECT_CURR_ID);
             $column = SubjectPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'SUBJECT_NAME') {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(SubjectCurrPeer::ID, SchedulePeer::SUBJECT_CURR_ID);
             $column = SubjectPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = SchedulePeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:55,代码来源:actions.class.php


示例13: executeSave

 public function executeSave()
 {
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $term = $this->getRequestParameter('term');
     $accal_id = $this->getRequestParameter('academic_calendar_id');
     $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
     $this->forward404Unless($academic_calendar);
     $employee_id = $this->getRequestParameter('employee_id');
     $employee = EmployeePeer::retrieveByPK($employee_id);
     $this->forward404Unless($employee);
     $descs = $this->getRequestParameter('desc');
     foreach ($descs as $m => $desc) {
         if ($desc != null) {
             if ($desc != '-') {
                 $ced = new Criteria();
                 $ced->add(StudentDescPeer::STUDENT_ACCAL_ID, $m);
                 $ced->add(StudentDescPeer::TERM, $term);
                 $spec = StudentDescPeer::doSelectOne($ced);
                 if ($spec == null) {
                     $spec = new StudentDesc();
                 }
                 $spec->setStudentAccalId($m);
                 $spec->setTerm($term);
                 $spec->setNote($desc);
                 $spec->save();
             } else {
                 $ced = new Criteria();
                 $ced->add(StudentDescPeer::STUDENT_ACCAL_ID, $m);
                 $ced->add(StudentDescPeer::TERM, $term);
                 $spec = StudentDescPeer::doSelectOne($ced);
                 if ($spec != null) {
                     $spec->delete();
                 }
             }
         }
     }
     return $this->redirect('course_tk/listScore?accal_id=' . $academic_calendar->getId() . '&term=' . $term . '&counseling_id=' . $counseling->getId() . '&employee_id=' . $employee_id);
 }
开发者ID:taryono,项目名称:school,代码行数:40,代码来源:actions.class.php


示例14: executeListElse

 public function executeListElse()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $group = $this->getContext()->getUser()->getAttribute('group', null, 'bo');
     if ($group == 'lector') {
         $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
         $employee = EmployeePeer::retrieveByPK($employee_id);
         if ($employee->getStaffTypeId() == 13 || $employee->getStaffTypeId() == 14) {
             $this->can_add == 0;
             $this->can_edit == 0;
             $this->can_remove == 0;
         }
         $this->employee = $employee;
     } else {
         $c = new Criteria();
         $c->add(JobPeer::CODE, $this->getModuleName());
         $job = JobPeer::doSelectOne($c);
         $acl = AclPeer::retrieveByPK($group_id, $job->getId());
         if (!$acl) {
             $this->forward('default', 'error404');
         }
         $this->can_edit = $acl->getEditPriv() == 1;
         $this->can_remove = $acl->getRemovePriv() == 1;
     }
     $counseling_id = $this->getRequestParameter('counseling_id');
     $counseling = CounselingPeer::retrieveByPK($counseling_id);
     $this->forward404Unless($counseling);
     $c = new Criteria();
     $c->add(VStudentElsePeer::ACADEMIC_CALENDAR_ID, $counseling->getAcademicCalendarId(), Criteria::IN);
     $c->add(VStudentElsePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
     $c->add(VStudentElsePeer::STATUS, Student::STATUS_GRADUATE, Criteria::NOT_EQUAL);
     $c->add(VStudentElsePeer::STATUS, Student::STATUS_OVERDUE, Criteria::NOT_EQUAL);
     $this->sortElse($c);
     if ($this->getRequest()->hasParameter('filters')) {
         $filters = $this->getRequestParameter('filters');
         if ($filters == 'clear') {
             $this->filters = null;
         } else {
             $defined_filter = false;
             foreach ($filters as $f) {
                 if (is_array($f)) {
                     if (strlen($f['from']) > 0 || strlen($f['to']) > 0) {
                         $defined_filter = true;
                         break;
                     }
                 } else {
                     if ($f != null && $f != '') {
                         $defined_filter = true;
                         break;
                     }
                 }
             }
             if ($defined_filter) {
                 $this->filters = $filters;
                 $this->filterElse($c, $this->getRequestParameter('filters'));
             }
         }
     }
     $rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'else'));
     $this->getUser()->setAttribute('max_per_page', $rpp, 'else');
     $pager = new sfPropelPager('VStudentElse', $rpp);
     $pager->setCriteria($c);
     $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'else'));
     $this->getUser()->setAttribute('page', $page, 'else');
     $pager->setPage($page);
     $pager->init();
     $this->pager = $pager;
     $actions = array(array('name' => 'filter', 'color' => 'white'));
     $filter_string = "";
     if ($this->filters) {
         foreach ($this->filters as $key => $val) {
             $filter_string .= "&filters[{$key}]={$val}";
         }
         $filter_string = preg_replace('/^&/', '', $filter_string);
     }
     array_unshift($actions, array('name' => 'back', 'url' => "student_finance/list", 'color' => 'black'));
     array_unshift($actions, array('name' => '_AS_CSV_', 'url' => "student_finance/listElseAsCSV?counseling_id={$counseling_id}&{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     array_unshift($actions, array('name' => '_AS_PDF_', 'url' => "student_finance/listElseAsPDF?counseling_id={$counseling_id}&{$filter_string}", 'color' => 'black', 'type' => 'direct'));
     $this->actions = $actions;
     $this->counseling = $counseling;
     $this->subtitle = $counseling->getAcademicCalendar()->toString() . ' # ' . $counseling->getClassGroup()->toString();
     $actions2 = array(array('name' => '<span>Jurnal Pembayaran Wakaf</span>', 'url' => 'student_finance/listStudent?counseling_id=' . $counseling->getId(), 'color' => 'sky'));
     array_unshift($actions2, array('name' => '<span>Jurnal Keuangan Murid</span>', 'url' => 'student_finance/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Jurnal Pembayaran Infaq</span>', 'url' => 'student_finance/listInfaq?counseling_id=' . $counseling->getId(), 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Jurnal Pembayaran SPP</span>', 'url' => 'student_finance/listSpp?counseling_id=' . $counseling->getId(), 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Jurnal Pembayaran Lain-lain</span>', 'url' => 'student_finance/listElse?counseling_id=' . $counseling->getId(), 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
 }
开发者ID:taryono,项目名称:school,代码行数:88,代码来源:actions.class.php


示例15: executeUpdate

 public function executeUpdate()
 {
     $i18n = new sfI18N();
     $i18n->initialize($this->getContext());
     $i18n->setCulture($this->getUser()->getCulture());
     $action_i18n = $i18n->globalMessageFormat->format('save as new');
     $action_type = $this->getRequestParameter('action_type');
     if ($action_type == $action_i18n || !$this->getRequestParameter('id')) {
         $employee_leave = new EmployeeLeave();
     } else {
         $employee_leave = EmployeeLeavePeer::retrieveByPk($this->getRequestParameter('id'));
         $this->forward404Unless($employee_leave);
     }
     $employee_leave->setId($this->getRequestParameter('id'));
     $employee_leave->setEmployeeId($this->getRequestParameter('employee_id'));
     if ($this->getRequestParameter('start')) {
         $employee_leave->setStart($this->getRequestParameter('start'));
     }
     if ($this->getRequestParameter('end')) {
         $employee_leave->setEnd($this->getRequestParameter('end'));
     }
     $employee = EmployeePeer::retrieveByPK($this->getRequestParameter('employee_id'));
     if ($employee) {
         $cd = new Criteria();
         $cd->add(EmployeeDetailPeer::EMPLOYEE_ID, $employee->getId());
         $employee_detail = EmployeeDetailPeer::doSelectOne($cd);
         if ($employee_detail->getEmployeeDivisionId()) {
             $employee_leave->setEmployeeDivisionId($employee_detail->getEmployeeDivisionId());
         }
         if ($employee->getDepartmentId()) {
             $employee_leave->setDepartmentId($employee->getDepartmentId());
         }
     }
     $employee_leave->setCode($this->getRequestParameter('code'));
     $employee_leave->setEmployeeLevelId($this->getRequestParameter('employee_level_id'));
     $employee_leave->setLeaveTypeId($this->getRequestParameter('leave_type_id'));
     $employee_leave->setLeaveLength($this->getRequestParameter('leave_length'));
     $employee_leave->setDetail($this->getRequestParameter('detail'));
     $employee_leave->setAddress($this->getRequestParameter('address'));
     $employee_leave->setStatus($this->getRequestParameter('status'));
     $employee_leave->setAcademicCalendarId($this->getRequestParameter('academic_calendar_id'));
     $employee_leave->save();
     return $this->redirect('employee_leave/list?employee_id=' . $this->getRequestParameter('employee_id'));
 }
开发者ID:taryono,项目名称:school,代码行数:44,代码来源:actions.class.php


示例16: filterPermit

 public function filterPermit($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'EXTRA_CODE') {
             $c->addJoin(EmployeePeer::ID, EmployeePermitPeer::EMPLOYEE_ID);
             $c->addJoin(EmployeeDetailPeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeeDetailPeer::getTableMap()->getColumn('EXTRA_CODE');
         } elseif ($key == 'LEVEL') {
             $c->addJoin(EmployeeLevelPeer::ID, EmployeePermitPeer::EMPLOYEE_LEVEL_ID);
             $column = EmployeeLevelPeer::getTableMap()->getColumn('LEVEL');
         } elseif ($key == 'EMP_NO') {
             $c->addJoin(EmployeePeer::ID, EmployeePermitPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'EMP_NAME') {
             $c->addJoin(EmployeePeer::ID, EmployeePermitPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } else {
             $column = EmployeePermitPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } elseif ($creoleType == CreoleTypes::DATE) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:55,代码来源:actions.class.php


示例17: doSelectJoinAllExceptRole

 /**
  * Selects a collection of User objects pre-filled with all related objects except Role.
  *
  * @param      Criteria  $c
  * @param      PropelPDO $con
  * @param      String    $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  * @return     array Array of User objects.
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAllExceptRole(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     foreach (sfMixer::getCallables('BaseUserPeer:doSelectJoinAllExcept:doSelectJoinAllExcept') as $callable) {
         call_user_func($callable, 'BaseUserPeer', $c, $con);
     }
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     // $c->getDbName() will return the same object if not set to another value
     // so == check is okay and faster
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     UserPeer::addSelectColumns($c);
     $startcol2 = UserPeer::NUM_COLUMNS - UserPeer::NUM_LAZY_LOAD_COLUMNS;
     EmployeePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (EmployeePeer::NUM_COLUMNS - EmployeePeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(UserPeer::EMPLOYEE_ID), array(EmployeePeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = UserPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = UserPeer::getInstanceFromPool($key1))) {
             // We no longer rehydrate the object, since this can cause data loss.
             // See http://propel.phpdb.org/trac/ticket/509
             // $obj1->hydrate($row, 0, true); // rehydrate
         } else {
             $omClass = UserPeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             UserPeer::addInstanceToPool($obj1, $key1);
         }
         // if obj1 already loaded
         // Add objects for joined Employee rows
         $key2 = EmployeePeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = EmployeePeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = EmployeePeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 EmployeePeer::addInstanceToPool($obj2, $key2);
             }
             // if $obj2 already loaded
             // Add the $obj1 (User) to the collection in $obj2 (Employee)
             $obj2->addUser($obj1);
         }
         // if joined row is not null
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:64,代码来源:BaseUserPeer.php


示例18: doSelectJoinAllExceptClassType

 public static function doSelectJoinAllExceptClassType(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     CounselingPeer::addSelectColumns($c);
     $startcol2 = CounselingPeer::NUM_COLUMNS - CounselingPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     EmployeePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + EmployeePeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + AcademicCalendarPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS;
     $c->addJoin(CounselingPeer::EMPLOYEE_ID, EmployeePeer::ID);
     $c->addJoin(CounselingPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(CounselingPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = CounselingPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = EmployeePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj2 = new $cls();
         $obj2->hydrate($rs, $startcol2);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj2 = $temp_obj1->getEmployee();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initCounselings();
             $obj2->addCounseling($obj1);
         }
         $omClass = AcademicCalendarPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getAcademicCalendar();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initCounselings();
             $obj3->addCounseling($obj1);
         }
         $omClass = ClassGroupPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getClassGroup();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addCounseling($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initCounselings();
             $obj4->addCounseling($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
开发者ID:taryono,项目名称:school,代码行数:82,代码来源:BaseCounselingPeer.php


示例19: doSelectJoinAllExceptLeaveType


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP EmployeeService类代码示例发布时间:2022-05-23
下一篇:
PHP Employee类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap