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


PHP Application_Model_DbTable_DbGlobal::getDeptById方法代码示例

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


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

示例1: editAction

 public function editAction()
 {
     if ($this->getRequest()->isPost()) {
         try {
             $_data = $this->getRequest()->getPost();
             $_dbmodel = new Application_Model_DbTable_DbDept();
             $_dbmodel->UpdateDepartment($_data);
             Application_Form_FrmMessage::Sucessfull("ការកៃប្រែដោយជោគជ័យ !", "/global/faculty/index");
             //$this->_redirect("");
         } catch (Exception $e) {
             $err = $e->getMessage();
             Application_Form_FrmMessage::message("Application Error!");
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
             echo $e->getMessage();
             exit;
         }
     }
     $id = $this->getRequest()->getParam("id");
     $_db = new Application_Model_DbTable_DbGlobal();
     $_row = $_db->getDeptById($id);
     $frm = new Application_Form_FrmOther();
     $frm->FrmAddDept($_row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_dept = $frm;
 }
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:25,代码来源:FacultyController.php

示例2: indexAction

 public function indexAction()
 {
     try {
         if ($this->getRequest()->isPost()) {
             $_data = $this->getRequest()->getPost();
             $search = array('title' => $session_servicetype->txtsearch, 'txtsearch' => $_data['title'], 'status' => $_data['status_search'], 'type' => $_data['type']);
             $limit = $session_servicetype->limit;
         } else {
             $search = '';
         }
         $db = new Accounting_Model_DbTable_DbTuitionFee();
         $service = $db->getAllTuitionFee($search);
         $model = new Application_Model_DbTable_DbGlobal();
         $row = 0;
         $indexterm = 1;
         $key = 0;
         if (!empty($service)) {
             foreach ($service as $i => $rs) {
                 $rows = $db->getFeebyOther($rs['id']);
                 $fee_row = 1;
                 if (!empty($rows)) {
                     foreach ($rows as $payment_tran) {
                         if ($payment_tran['payment_type'] == 1) {
                             $rs_rows[$key] = $this->headAddRecordTuitionFee($rs, $key);
                             $term = $model->getAllPaymentTerm($fee_row);
                             $rs_rows[$key]['quarter'] = $payment_tran['tuition_fee'];
                             $key_old = $key;
                             $key++;
                         } elseif ($payment_tran['payment_type'] == 2) {
                             $term = $model->getAllPaymentTerm($payment_tran['payment_type']);
                             $rs_rows[$key_old]['semester'] = $payment_tran['tuition_fee'];
                         } elseif ($payment_tran['payment_type'] == 3) {
                             $term = $model->getAllPaymentTerm($payment_tran['payment_type']);
                             $rs_rows[$key_old]['year'] = $payment_tran['tuition_fee'];
                         } else {
                             $term = $model->getAllPaymentTerm($payment_tran['payment_type']);
                             $rs_rows[$key_old]['full_fee'] = $payment_tran['tuition_fee'];
                         }
                         if ($rs['degree_type'] == 1) {
                             $rs_rows[$key_old]['faculty_name'] = Application_Model_DbTable_DbGlobal::getAllMention($payment_tran['metion']);
                         } else {
                             $r_facu = $model->getDeptById($payment_tran['metion']);
                             $rs_rows[$key_old]['faculty_name'] = $r_facu['en_name'];
                         }
                     }
                 }
             }
         } else {
             $result = Application_Model_DbTable_DbGlobal::getResultWarning();
         }
         $pay_term = $model->getAllPaymentTerm();
         $payment_term = '';
         foreach ($pay_term as $value) {
             $payment_term .= '"' . $value . '",';
         }
         $list = new Application_Form_Frmtable();
         $collumns = array("DEGREE", "FACULTY/METION", "BATCH", "STATUS", "QUARTER", "SEMESTER", "YEAR", "FULL_FEE");
         $link = array('module' => 'accounting', 'controller' => 'fee', 'action' => 'edit-feetuition');
         $urlEdit = BASE_URL . "/product/index/update";
         $this->view->list = $list->getCheckList(1, $collumns, $rs_rows, array('degree' => $link));
     } catch (Exception $e) {
         Application_Form_FrmMessage::message("APPLICATION_ERROR");
         Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
     }
     $frm = new Global_Form_FrmSearchMajor();
     $frm = $frm->frmSearchTutionFee();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_search = $frm;
 }
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:69,代码来源:FeeController.php


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